Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Encrypts data with with AES engine in CBC mode.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Encryption | 2.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
This function was deprecated. Use Encryption.Cipher instead.
Parameter | Description | Example | Flags |
---|---|---|---|
key | The key you want to use. | "Hello" | |
text | The text to encrypt. | "Hello World" | |
iv | The initial vector as a text with up to 16 bytes length. | "1234567890ABCDEF" | Optional |
Returns encrypted text encoded as hex.
Simply encrypt a text:
MBS( "Encryption.EncryptAES"; $key; $text )
Trying to reproduce Encryption.EncryptAES with Encryption.Cipher:
So, let's try a test case:
MBS( "Encryption.EncryptAES"; "Hello World"; "Hello World")
514532926253C04A15302CF85BD7C816
And sicken AES adds zeros to fill blocks, we have to use hex mode here:
MBS( "Encryption.Cipher"; "encrypt"; "AES-128-CBC";
"Hex"; HexEncode("Hello World") ; "";
"Hex"; HexEncode("Hello World") & "0000000000"; "";
"Hex"; "";
""; ""; ""; 0 )
Gives
514532926253C04A15302CF85BD7C8168E6AE36F6FB574F32FEA6932A5E0595F
Which looks like it uses two blocks instead of one above.
This function checks for a license.
Created 18th August 2014, last changed 19th January 2022