These functions can be used when hashing data, encrypting data, and for securely authenticating users into the database.
| Function | Description | 
|---|---|
| crypto::blake3() | Returns the blake3 hash of a value | 
| crypto::joaat() | Returns the joaat hash of a value | 
| crypto::md5() | Returns the md5 hash of a value | 
| crypto::sha1() | Returns the sha1 hash of a value | 
| crypto::sha256() | Returns the sha256 hash of a value | 
| crypto::sha512() | Returns the sha512 hash of a value | 
| crypto::argon2::compare() | Compares an argon2 hash to a password | 
| crypto::argon2::generate() | Generates a new argon2 hashed password | 
| crypto::bcrypt::compare() | Compares an bcrypt hash to a password | 
| crypto::bcrypt::generate() | Generates a new bcrypt hashed password | 
| crypto::pbkdf2::compare() | Compares an pbkdf2 hash to a password | 
| crypto::pbkdf2::generate() | Generates a new pbkdf2 hashed password | 
| crypto::scrypt::compare() | Compares an scrypt hash to a password | 
| crypto::scrypt::generate() | Generates a new scrypt hashed password | 
crypto::blake3Available since: v2.0.0
The crypto::blake3 function returns the blake3 hash of the input value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::joaatAvailable since: v3.0.0-alpha.7
The crypto::joaat function returns the joaat hash of the input value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::md5The crypto::md5 function returns the md5 hash of the input value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::sha1The crypto::sha1 function returns the sha1 hash of the input value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::sha256The crypto::sha256 function returns the sha256 hash of the input value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::sha512The crypto::sha512 function returns the sha512 hash of the input value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::argon2::compareThe crypto::argon2::compare function compares a hashed-and-salted argon2 password value with an unhashed password value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::argon2::generateThe crypto::argon2::generate function hashes and salts a password using the argon2 hashing algorithm.
ImportantAt this time, there is no way to customize the parameters for this function. This applies to: memory, iterations and parallelism.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::bcrypt::compareThe crypto::bcrypt::compare function compares a hashed-and-salted bcrypt password value with an unhashed password value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::bcrypt::generateThe crypto::bcrypt::generate function hashes and salts a password using the bcrypt hashing algorithm.
ImportantAt this time, there is no way to customize the work factor for bcrypt.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::pbkdf2::compareThe crypto::pbkdf2::compare function compares a hashed-and-salted pbkdf2 password value with an unhashed password value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::pbkdf2::generateThe crypto::pbkdf2::generate function hashes and salts a password using the pbkdf2 hashing algorithm.
ImportantAt this time, there is no way to customize the number of iterations for pbkdf2.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::scrypt::compareThe crypto::scrypt::compare function compares a hashed-and-salted scrypt password value with an unhashed password value.
The following example shows this function, and its output, when used in a RETURN statement:
crypto::scrypt::generateThe crypto::scrypt::generate function hashes and salts a password using the scrypt hashing algorithm.
ImportantAt this time, there is no way to customize the parameters for this function. This applies to: cost parameter, block size and parallelism.
The following example shows this function, and its output, when used in a RETURN statement: