myPKEModule.Decrypt(encryptedData);
myPKEModule | The name of the Public Key Encryption module structure |
encryptedData | The 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) );