SymmetricEncryption Module

mySymEncModule := STD.Crypto.SymmetricEncryption(algorithm, passphrase);

mySymEncModuleThe name of the Symmetric Encryption module structure
algorithmThe algorithm to use, as returned by SupportedSymmetricCipherAlgorithms()
passphraseThe passphrase to use for encryption/decryption

A Symmetric Encryption module is defined in ECL. Subsequent function definitions use the options specified in the Symmetric Encryption module definition.

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