You can override an encryption/decryption key from the Key Manager at runtime. Use PGP type KeyManager in Data Security for encrypting/decrypting the key.
Follow these steps to override key:
- Set the Base64 encoded key in String Format in context variable Service.DataSecurityActivityName.keyInStringFormat and follow these steps at runtime:
- Get the key String.
- Decode the Base64 String into actual key String.
- Covert it into PGP Key and use it for encrypting/decrypting.
- Set the context variable Service.DataSecurityActivityName.privateKeyPassword to override the private key password.
If Data Security activity is Encryption then the key is a public else private.
- You must provide the password in plain text format.
- Do not save the Service variables in context info file.