Almost finished encrypt and decrypt