Decrypt (Symmetric)

mySymEncModule.Decrypt(encryptedData);

mySymEncModuleThe name of the Symmetric 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 defined in the Symmetric Encryption module. You can only decrypt data that was encrypted by the Standard Library's Encrypt method.

Example:

IMPORT STD;

//Symmetric Encryption module definition
mySymEncModule := Std.Crypto.SymmetricEncryption('aes-256-cbc',
                                                 '12345678901234567890123456789012'); 

//encrypt/decrypt string literals
STRING myStr := 'The quick brown fox jumps over the lazy dog';
DATA   encryptedStr := mySymEncModule.Encrypt((DATA)myStr);
STRING decryptedStr := (STRING)mySymEncModule.Decrypt(encryptedStr) ;

OUTPUT(myStr); 
OUTPUT(decryptedStr);