======aes_encrypt====== WMMEGA FW >= 2.1147 WM-M2 FW >= 3.1147 Encrypt data in string using the AES algorithm ====Description==== string aes_encrypt ( string $data , int $length , string $key , string $iv ) Encrypts the string $data with length $length bytes. Pass the encryption key and iv value in the corresponding fields. ====Parameter==== $data: Data to encrypt - it should be a multiple of 16 bytes long $length: length of data $key: Encryption key - this should be multiples of 16 bytes long. A 16 character string will yield 128-bit encryption. $iv: This should be a unique 16 character string which will be used for the iv table ====Return Values==== Encrypted string (or int 0 for error) ====Example====



The above example will output something similar to:

Your encrypted data is: fcPkxhW0UM4VIYB1CsbK/7wEBuC4WAwcO5tDBkcMXbckp5yUp4a92BeD7VpVGwd1
Your decrypted data is: This is my super secret encrypted string 


====See Also====

[[aes_decrypt()]] - Decrypt data using the AES algorithm