sample encryption/decryption which mirrors the logic within corespring encryption/decryption