Crypto Lib
    Preparing search index...

    Interface HashPasswordOptions

    Options for hashing a password with Argon2.

    interface HashPasswordOptions {
        password: string | Uint8Array<ArrayBufferLike>;
        salt?: string | Uint8Array<ArrayBufferLike>;
        timeCost?: number;
        memoryCost?: number;
        parallelism?: number;
        hashLength?: number;
        variant?: Argon2Variant;
    }
    Index
    password: string | Uint8Array<ArrayBufferLike>

    Password to hash (UTF-8 string or bytes).

    salt?: string | Uint8Array<ArrayBufferLike>

    Salt (hex string or bytes). If omitted, a random 16-byte salt is generated.

    timeCost?: number

    Time cost (iterations). Default: 3.

    memoryCost?: number

    Memory cost in KiB. Default: 65536 (64 MB).

    parallelism?: number

    Parallelism (lanes). Default: 4.

    hashLength?: number

    Output hash length in bytes. Default: 32.

    variant?: Argon2Variant

    Argon2 variant. Default: argon2id.