Documentation
    Preparing search index...

    Shape of argon2 config

    type ArgonConfig = {
        variant?: ArgonVariants;
        version?: 16 | 19;
        iterations?: number;
        memory?: number;
        parallelism?: number;
        saltSize?: number;
        secret?: Secret<string>;
        hashLength?: number;
    }
    Index

    Properties

    variant?: ArgonVariants

    The argon hash type to use. https://github.com/ranisalt/node-argon2/wiki/Options#type

    Default is id

    version?: 16 | 19

    The argon2 version to use. The latest version is better.

    Default is 19

    iterations?: number

    Iterations increases hash strength at the cost of time required to compute. https://github.com/ranisalt/node-argon2/wiki/Options#timecost

    Default is 3

    memory?: number

    The amount of memory to be used by the hash function, in KiB https://github.com/ranisalt/node-argon2/wiki/Options#memorycost.

    Default is 65536

    parallelism?: number

    The amount of threads to compute the hash on https://github.com/ranisalt/node-argon2/wiki/Options#parallelism.

    Default is 4

    saltSize?: number

    The size (in bytes) for the auto generated hash salt.

    Default is 16

    secret?: Secret<string>

    Specify a custom secret (known as "pepper") when hashing the value. Remember, the secret is not encoded within the hash, therefore it makes the hash verification also require the same secret.

    If you loose the secret, then you won't be able to verify the hashes.

    hashLength?: number

    Maximum length for the raw hash in bytes. The serialized output will always be longer than the raw hash.

    Default is 32