@me2em/crypto
    Preparing search index...

    Function validatePasswordStrength

    • Validates password strength with detailed feedback.

      Performs 7 checks: length ≥14, 4 character types, unique chars ≥12, no repeats, no sequential patterns, not in common list, entropy ≥80 bits, and HIBP breach check.

      Note: HIBP check (see checkPasswordLeak) is fail-open and holds the password + SHA-1 hash in memory until GC — inherent to the string API.

      Parameters

      • password: string

        The password to validate.

      Returns Promise<PasswordValidationResult>

      A detailed validation result.

      const result = validatePasswordStrength('MyStr0ng!Pass#2024');
      if (!result.isSecure) {
      console.warn(result.feedback);
      }