Getting exception while using KMFCryptoOperation to encrypt data.

Madhavi
Tera Contributor

Hi,

 

I am using KMFCryptoOperation API to perform symmetric data encryption /decryption.

Firstly I have created Cryptographic module , Cryptographic specifications under that module and created key to use.

After doing all above I added below statements into our code to encrypt the data :

 
var op = new sn_kmf_ns.KMFCryptoOperation("x_155935_igi.ibm_crypto_module1","SYMMETRIC_ENCRYPTION").withInputFormat("KMFNone");
var result = op.doOperation("Text with no encoding");
 
When I execute above statements I am getting error  "Error com.glide.kmf.InvalidCryptoModuleOperationException: Invalid module name x_155935_igi.ibm_crypto_module1"  always.

Unable to understand what exactly issue here.Please help if any one has any idea here ?

 

Thank in advance,

Madhavi Devadkar.

 

Madhavi_1-1736327668552.png

Madhavi_2-1736327690995.png

Madhavi_3-1736327715274.png

 

1 REPLY 1

Ravi Prathapagi
ServiceNow Employee
ServiceNow Employee

Looks like you have added some module policy exceptions to the crypto module. 
Pls re-check it...