Home Contents | # AES Setup | Cipher | Core4 Lua Commands

## SYNOPSIS

1. aes:setupEncrypt(key)
2. aes:setupDecrypt(key)

## DESCRIPTION

Initialize encryption or decryption with secret key from key.

The key must be exactly 16, 24 or 32 bytes long, to initialize with a 128, 192 or 256 bit key length.

## ERRORS

Raises an error if aes is not an AES state handle as returned by cipher.aes().

## SEE ALSO

aes:cbcDecrypt, aes:cbcEncrypt, aes:clearIV, aes:decrypt, aes:encrypt, aes:getIV, aes:padDecrypt, aes:padEncrypt, aes:setIV, cipher.aes, cipher.random