Encryption functionality works