Added encryption and decryption functionality to crypto