Crypto Testing
    Preparing search index...

    Interface MockHashPasswordResult

    Result from mockHashPassword.

    import type { MockHashPasswordResult } from "@sebastienrousseau/crypto-testing";

    const result: MockHashPasswordResult = mockHashPassword("secret");
    console.log(result.hash, result.phc);
    interface MockHashPasswordResult {
        hash: string;
        salt: string;
        params: { t: number; m: number; p: number };
        algorithm: "mock-argon2id";
        phc: string;
    }
    Index
    hash: string

    Hex-encoded hash (deterministic, NOT Argon2).

    salt: string

    Hex-encoded salt.

    params: { t: number; m: number; p: number }

    Dummy params matching the Argon2 shape.

    Type Declaration

    • t: number

      Time cost (iterations).

    • m: number

      Memory cost (KiB).

    • p: number

      Parallelism factor.

    algorithm: "mock-argon2id"

    Algorithm identifier.

    phc: string

    PHC-format string.