error with encryption

I have some issues with the encryption/decryption. I am trying to find what is wrong.