The sqlpage.hash_password function

Introduced in SQLPage 0.7.2.

Hashes a password using the Argon2 algorithm. The resulting hash can be stored in the database and then used with the authentication component.

Example

SELECT 'form' AS component;
SELECT 'username' AS name;
SELECT 'password' AS name, 'password' AS type;

INSERT INTO users (name, password_hash) VALUES (:username, sqlpage.hash_password(:password));

Try online

You can try the password hashing function on this page.

Parameters

password

The password to hash.