Encryption and decryption work

Fixes