Added methods to encrypt/decrypt key data