@me2em/crypto
    Preparing search index...

    Function deriveKeyArgon2id

    • Derives a key from a password with Argon2id under the given profile.

      The password is NFKC-normalized before hashing (consistent with @me2em/core name/context canonicalization). Callers SHOULD still normalize UI input for display, but hashing is canonical — the same logical password in different Unicode forms (e.g. the ligature fi vs fi, precomposed vs decomposed accents) produces the SAME key. BREAKING vs earlier versions: hashes produced before NFKC normalization was introduced will not verify — re-derive.

      Parameters

      • password: string

        The human password (any Unicode form; NFKC-folded internally before hashing).

      • salt: Uint8Array

        Salt bytes (see generateArgon2Salt for the profile-appropriate size).

      • profile: string

        One of ARGON2_PROFILES keys (INTERACTIVE, SENSITIVE).

      Returns Promise<DeriveKeyResult>

      The derived key, the salt, the profile name and the effective parameters.

      INVALID_ARGUMENT if the profile is unknown.