KMIP Encrypt and Decrypt Sample
The following example demonstrates KMIP Encrypt and Decrypt operations using GCM algorithm.
Open a valid KMIP session.
Take a instance for GCM.
Create a spec for GCM.
Initialize KMIP Cipher with the given key name/UID, spec and session in encrypt mode.
Perform cipher operation and return the result in
KMIPCryptoResult
object.Encrypted result is returned in hex format.
Take the GCM cipher instance for decryption.
Initialize KMIP Cipher with the given key name, spec and session in decrypt mode.
Decrypted result is returned.
Print the decrypted result.