Cryptography methods with example usage