AesIv
aesiv() produces a cryptographically random 16-byte (128-bit) Initialization Vector, returned as a base64-encoded text string. The IV ensures that identical plaintexts encrypted with the same key produce different ciphertexts, preventing pattern analysis attacks.
Together with aeskey(), the IV forms the two required inputs to the AES encryption system. The IV does not need to be secret, it is safe to store and transmit alongside the ciphertext, but it must be unique per encryption operation and must be passed to aesdecrypt() unchanged.
Syntax
Parameters
Parameter
Type
Description
—
This function takes no parameters.
Last updated
Was this helpful?