Encrypt (Symmetric)

mySymEncModule.Encrypt(inputData);

mySymEncModuleThe name of the Symmetric Encryption module structure
inputDataThe data to encrypt in DATA format
Return:Encrypted contents in DATA format

The Encrypt function encrypts the given inputData, using the options defined in the Symmetric Encryption module.

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);