iya-sts
    Preparing search index...

    Variable storedSecretIsWeaker

    storedSecretIsWeaker: (stored: any, spec: any) => boolean = storedSecretIsWeaker

    Type Declaration

      • (stored: any, spec: any): boolean
      • Says whether a stored password hash costs strictly less than a new one under this spec, or names a different algorithm.

        Cost is N·r·p for scrypt and memory·passes for argon2id. An equal cost with different parameters is not weaker, and an unreadable value is not weaker. The upgrade on sign-in asks this when the parameters differ (#872): a stronger hash is not rewritten down, and a change of algorithm still is.

        Parameters

        • stored: any

          the stored form

        • spec: any

          the policy's hash spec

        Returns boolean

        true when hashing again would raise the cost, or change algorithm