Encryption / decryption method changed to serialization encoding