Result of a password hashing operation (Argon2).
const { data } = await client.passwordHash({ password: 'hunter2' });const result: PasswordHashResult = data;console.log(result.phc); // PHC-format stringconsole.log(result.hash, result.salt, result.params); Copy
const { data } = await client.passwordHash({ password: 'hunter2' });const result: PasswordHashResult = data;console.log(result.phc); // PHC-format stringconsole.log(result.hash, result.salt, result.params);
Hex-encoded password hash.
Hex-encoded salt used for hashing.
Argon2 cost parameters (time, memory, parallelism).
Time cost (iterations).
Memory cost (KiB).
Parallelism factor.
Argon2 variant used (e.g. "argon2id").
"argon2id"
PHC-format encoded hash string.
Result of a password hashing operation (Argon2).
Example