crypto functionality and examples