Encrypt and decrypt data in an image