Class Pbkdf2ParameterCalibrator

java.lang.Object
com.svenruppert.jsentinel.credential.password.pbkdf2.Pbkdf2ParameterCalibrator
All Implemented Interfaces:
ParameterCalibrationService

public final class Pbkdf2ParameterCalibrator extends Object implements ParameterCalibrationService
Calibrates the PBKDF2-HMAC-SHA-256 iteration count for a target verification runtime.

The calibrator scales iterations linearly: it picks a starting iteration count, measures one hash, scales by the runtime ratio, measures again, and stops once the runtime is within ±10%% of the target or after a small cap on attempts. The result is the CalibrationProfile the operator persists; production code reloads the profile through CalibrationProfileStore and never recalibrates on startup (CWE-754).

  • Constructor Details

    • Pbkdf2ParameterCalibrator

      public Pbkdf2ParameterCalibrator()
    • Pbkdf2ParameterCalibrator

      public Pbkdf2ParameterCalibrator(Pbkdf2PasswordHashProvider provider, LongSupplier clockNanos, Clock wallClock, int startIterations, int keyLengthBytes)
  • Method Details