Table of Contents

TDefaultPasswordHasher.HashPassword Method

Hashes a password using a random salt and the configured SHA-2 variant.

Syntax

Unit: Sphinx.DefaultPasswordHasher

function TDefaultPasswordHasher.HashPassword(User: TUser; const Password: string): string; virtual;

Parameters

<-> Parameter Type Description
User TUser The user the password belongs to. Not used by this implementation.
const Password string The plain-text password to hash.

Returns

The hashed value in the format salt.hash, or just the hash when SaltLength is 0.

See also