Record Class CredentialMetricEvent.HashDuration
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.metrics.CredentialMetricEvent.HashDuration
- Record Components:
algorithm- algorithm identifier usedproviderId- provider identifier usedpolicyVersion- policy version under which the hash was produceddurationMicros- wall-clock duration in microsecondspeppered- whether the result envelope carried a pepper key id
- All Implemented Interfaces:
CredentialMetricEvent
- Enclosing interface:
CredentialMetricEvent
public static record CredentialMetricEvent.HashDuration(String algorithm, String providerId, int policyVersion, long durationMicros, boolean peppered)
extends Record
implements CredentialMetricEvent
One
PasswordHashingService.hash call completed.-
Nested Class Summary
Nested classes/interfaces inherited from interface CredentialMetricEvent
CredentialMetricEvent.AbuseSignal, CredentialMetricEvent.HashDuration, CredentialMetricEvent.KdfLimiterRejection, CredentialMetricEvent.LifecycleTransition, CredentialMetricEvent.RehashRequested, CredentialMetricEvent.VerifyDurationModifier and TypeInterfaceDescriptionstatic final recordAbuse pattern detector fired.static final recordOnePasswordHashingService.hashcall completed.static final recordThe KDF execution limiter shed an inbound verification.static final recordA credential moved between lifecycle states.static final recordA successful verification triggered a transparent rehash.static final recordOnePasswordHashingService.verifycall completed. -
Constructor Summary
ConstructorsConstructorDescriptionHashDuration(String algorithm, String providerId, int policyVersion, long durationMicros, boolean peppered) Creates an instance of aHashDurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmrecord component.longReturns the value of thedurationMicrosrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanpeppered()Returns the value of thepepperedrecord component.intReturns the value of thepolicyVersionrecord component.Returns the value of theproviderIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HashDuration
public HashDuration(String algorithm, String providerId, int policyVersion, long durationMicros, boolean peppered) Creates an instance of aHashDurationrecord class.- Parameters:
algorithm- the value for thealgorithmrecord componentproviderId- the value for theproviderIdrecord componentpolicyVersion- the value for thepolicyVersionrecord componentdurationMicros- the value for thedurationMicrosrecord componentpeppered- the value for thepepperedrecord 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
-
policyVersion
public int policyVersion()Returns the value of thepolicyVersionrecord component.- Returns:
- the value of the
policyVersionrecord component
-
durationMicros
public long durationMicros()Returns the value of thedurationMicrosrecord component.- Returns:
- the value of the
durationMicrosrecord component
-
peppered
-