AesIv
Generates a random Initialization Vector (IV) for use with aesencrypt() and aesdecrypt().
Returns a plaintext
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
AesIV() use for MFA
The AesIV() result is assigned to the field [Users.MfaVector] in a previous assignment.
AesEncrypt() is used to encrypt and assign the users secret to the [Users.MFASecret] field
AesEncrypt([Authentication.Mfa.TempmfaSecret]
,[System.MfaKey]
,[Users.Mfa.MfaVector])The result is now together with the vector stored in the Users database list, and can then together be used to for the creation of 2fa codes. You can find more information about 2fa here.
Parameters
—
This function takes no parameters.
Last updated
Was this helpful?