Implement encryption/decryption of metadata