Class DefaultPasswordHashingService

java.lang.Object
com.svenruppert.jsentinel.credential.password.DefaultPasswordHashingService
All Implemented Interfaces:
PasswordHashingService

public final class DefaultPasswordHashingService extends Object implements PasswordHashingService
Reference PasswordHashingService.

Each verify(...) call walks the pipeline in this strict order:

  1. acquire limiter permit — one KdfExecutionLimiter permit covers the whole call, including any dummy KDF taken on failure;
  2. parse — decode the envelope through PasswordHashCodec;
  3. validate — gate the envelope through PasswordHashValidator (rejects out-of-bound parameters cheaply, CWE-400);
  4. resolveProvider — look up the provider that produced the envelope (CWE-693);
  5. resolvePepper — ask the PepperService for the stored pepper key; Phase 1a's NoOpPepperService never resolves a key, so any peppered envelope correctly fails verification rather than getting silently downgraded;
  6. verify — delegate the constant-time comparison to the provider;
  7. rehashDecision — on success, compute whether the envelope should be transparently upgraded.

Every failure path executes a comparable DummyVerificationService call before returning so that "user does not exist", "envelope is malformed" and "provider is missing" collapse onto the same observable timing profile (CWE-203, CWE-208). Every public failure collapses onto PublicFailureType.INVALID_CREDENTIALS; the differentiated InternalAuditEventType is preserved for audit sinks.