Record Class CalibrationProfile
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.password.calibration.CalibrationProfile
- Record Components:
algorithm- canonical algorithm identifierproviderId- provider that produced the profileparameters- calibrated parameter map (defensive copy, unmodifiable)targetMillis- the runtime the operator asked formeasuredMillis- the runtime actually achieved withparametersduring calibrationcalibratedAt- instant the calibration finished
public record CalibrationProfile(String algorithm, String providerId, Map<String,String> parameters, long targetMillis, long measuredMillis, Instant calibratedAt)
extends Record
Reproducible calibration result for a single password-hash algorithm.
Operators run the calibrator once for a target verification time (typically 200–500 ms) and persist the resulting profile. At startup the policy loads the profile and uses its parameters; the system never calibrates silently on every startup (a quiet recalibration would defeat reproducibility and make rehash decisions non-deterministic, CWE-754).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmrecord component.Returns the value of thecalibratedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themeasuredMillisrecord component.Returns the value of theparametersrecord component.Returns the value of theproviderIdrecord component.longReturns the value of thetargetMillisrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CalibrationProfile
public CalibrationProfile(String algorithm, String providerId, Map<String, String> parameters, long targetMillis, long measuredMillis, Instant calibratedAt) Creates an instance of aCalibrationProfilerecord class.- Parameters:
algorithm- the value for thealgorithmrecord componentproviderId- the value for theproviderIdrecord componentparameters- the value for theparametersrecord componenttargetMillis- the value for thetargetMillisrecord componentmeasuredMillis- the value for themeasuredMillisrecord componentcalibratedAt- the value for thecalibratedAtrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
algorithm
-
providerId
Returns the value of theproviderIdrecord component.- Returns:
- the value of the
providerIdrecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-
targetMillis
public long targetMillis()Returns the value of thetargetMillisrecord component.- Returns:
- the value of the
targetMillisrecord component
-
measuredMillis
public long measuredMillis()Returns the value of themeasuredMillisrecord component.- Returns:
- the value of the
measuredMillisrecord component
-
calibratedAt
Returns the value of thecalibratedAtrecord component.- Returns:
- the value of the
calibratedAtrecord component
-