Record Class CredentialMetricEvent.HashDuration

java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.metrics.CredentialMetricEvent.HashDuration
Record Components:
algorithm - algorithm identifier used
providerId - provider identifier used
policyVersion - policy version under which the hash was produced
durationMicros - wall-clock duration in microseconds
peppered - 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.
  • Constructor Details

    • HashDuration

      public HashDuration(String algorithm, String providerId, int policyVersion, long durationMicros, boolean peppered)
      Creates an instance of a HashDuration record class.
      Parameters:
      algorithm - the value for the algorithm record component
      providerId - the value for the providerId record component
      policyVersion - the value for the policyVersion record component
      durationMicros - the value for the durationMicros record component
      peppered - the value for the peppered record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • algorithm

      public String algorithm()
      Returns the value of the algorithm record component.
      Returns:
      the value of the algorithm record component
    • providerId

      public String providerId()
      Returns the value of the providerId record component.
      Returns:
      the value of the providerId record component
    • policyVersion

      public int policyVersion()
      Returns the value of the policyVersion record component.
      Returns:
      the value of the policyVersion record component
    • durationMicros

      public long durationMicros()
      Returns the value of the durationMicros record component.
      Returns:
      the value of the durationMicros record component
    • peppered

      public boolean peppered()
      Returns the value of the peppered record component.
      Returns:
      the value of the peppered record component