Decrypt (PKE)

myPKEModule.Decrypt(encryptedData);

myPKEModuleThe name of the Public Key Encryption module structure
encryptedDataThe data to decrypt in DATA format
Return:Decrypted contents in DATA format

The Decrypt function decrypts the given encryptedData, using the options specified in the Public Key Encryption module definition. You can only decrypt data that was encrypted by the Standard Library's Encrypt method.

Example:

IMPORT STD;
privKeyFile := '/var/lib/HPCCSystems/myesp/test.key';
pubKeyFile :=  '/var/lib/HPCCSystems/myesp/test.key.pub';

//PKE Encryption module definition
myPKEModule := STD.Crypto.PublicKeyEncryption('RSA', pubKeyFile, privKeyFile,''); 

DATA encrypted := myPKEModule.Encrypt((DATA)'The quick brown fox jumps over the lazy dog');

OUTPUT( (STRING)myPKEModule.Decrypt(encrypted) );