@vvlad1973/crypto - v2.4.0
    Preparing search index...

    Function hashPassword

    • Hash a plaintext password for storage using scrypt.

      A fresh 16-byte salt is generated per call, so hashing the same password twice yields different strings. The result is fully self-describing (see the module docs) and safe to store in a single text column.

      Parameters

      • plain: string

        The plaintext password to hash.

      • Optionaloptions: HashPasswordOptions

        Optional scrypt parameter overrides.

      Returns Promise<string>

      The stored hash: scrypt$1$<params>$<saltHex>$<hashHex>.