image encryption and decryption back to previous edition