Record Class Pbkdf2Limits

java.lang.Object
java.lang.Record
zeroecho.sdk.Pbkdf2Limits
Record Components:
operationalMaximum - largest iteration count accepted from trusted local configuration
absoluteDecodedMaximum - hard safety ceiling for untrusted decoded data

public record Pbkdf2Limits(int operationalMaximum, int absoluteDecodedMaximum) extends Record
Explicit PBKDF2 work-factor limits for trusted configuration and decoded data.
Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Mandatory minimum PBKDF2 iteration count.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pbkdf2Limits(int operationalMaximum, int absoluteDecodedMaximum)
    Validates minimum <= operationalMaximum <= absoluteDecodedMaximum.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the absoluteDecodedMaximum record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the operationalMaximum record component.
    final String
    Returns a string representation of this record class.
    void
    validateDecoded(int iterations)
    Validates an untrusted decoded iteration count before KDF execution.
    void
    validateTrusted(int iterations)
    Validates trusted local configuration.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • MINIMUM

      public static final int MINIMUM
      Mandatory minimum PBKDF2 iteration count.
      See Also:
  • Constructor Details

    • Pbkdf2Limits

      public Pbkdf2Limits(int operationalMaximum, int absoluteDecodedMaximum)
      Validates minimum <= operationalMaximum <= absoluteDecodedMaximum.
      Throws:
      IllegalArgumentException - if the limits violate the ordering
  • Method Details

    • validateTrusted

      public void validateTrusted(int iterations)
      Validates trusted local configuration.
      Parameters:
      iterations - requested iteration count
      Throws:
      IllegalArgumentException - if outside the operational range
    • validateDecoded

      public void validateDecoded(int iterations)
      Validates an untrusted decoded iteration count before KDF execution.
      Parameters:
      iterations - decoded iteration count
      Throws:
      IllegalArgumentException - if outside the absolute safety range
    • 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. All components in this record class 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.
    • operationalMaximum

      public int operationalMaximum()
      Returns the value of the operationalMaximum record component.
      Returns:
      the value of the operationalMaximum record component
    • absoluteDecodedMaximum

      public int absoluteDecodedMaximum()
      Returns the value of the absoluteDecodedMaximum record component.
      Returns:
      the value of the absoluteDecodedMaximum record component