aes256_encrypt()

Encrypts a string using the AES-256 encryption algorithm with a provided key.

Syntax

aes256_encrypt(key, plaintext)

Parameters

Parameter Type Description Comment
key String The encryption key to be used for AES-256 encryption.
plaintext String The string to be encrypted.

Return Value

Examples

Encrypt the string “HelloWorld” with the key “mysecretkey”

aes256_encrypt("mysecretkey", "HelloWorld"); // returns the encrypted string in Base64 format

See also

aes256_encrypt
aes256_encrypt_f
aes256_decrypt
aes256_decrypt_f