The AesEncrypt() function generates a Base64-encoded Ciphertext based on the given parameters, using the AES-256-CBC encryption method (wikipedia), with PKCS7 padding.

Syntax

AesEncrypt(plaintext, key, vector)
AesEncrypt(plaintext, key, vector, BOM)

Returns

A new text that is an encrypted value.

Parameters

  • plaintext: the normal text to be encrypted;
  • key: the secret to be used for the encryption; this has to be a Hexadecimal value of 64 characters (function AesKey() generates a valid key);
  • vector: the initialization vector, a Hexadecimal value of 32 characters (function AesIv() generates a valid vector);
  • BOM: a boolean to include the ByteOrderMark (default true, based on Microsoft .Net implementation); if value needs to be decrypted in other Non-Microsoft environments, this value must be set to False.

Example

AesEncrypt("Example of Encrypted Value", [Settings.AesKey], [Settings.AesVector], false)

Result : vujMotswVUJ14554DGmVQmB8CoJvOhXdhEZvdj6paY8=
AesKey value: 81d21bc45b70212e9449728b34a8e08413003176e8092eb18119ede0f6651b66
AesVector value: c28a26824fd0fdce36ab966f1c43692b

 +31 (0)20 240 21 20       

Videos and images courtesy of WEM Modeler. © 2019. WEM Modeler.
SitemapPrivacy - Terms - Company

 +31 (0)20 240 21 20       


Videos and images courtesy of WEM Modeler.
© 2019 WEM Modeler.
SitemapPrivacy - Terms - Company