Record Class CmpPbmPolicy

java.lang.Object
java.lang.Record
zeroecho.pkix.cmp.CmpPbmPolicy
Record Components:
minimumIterations - positive work floor
maximumIterations - work ceiling, at most one million
minimumSaltBytes - salt floor, at least sixteen
maximumSaltBytes - salt ceiling, at most sixty-four
digestOids - nonempty allowed standard digest OIDs
macOids - nonempty allowed standard HMAC OIDs

public record CmpPbmPolicy(int minimumIterations, int maximumIterations, int minimumSaltBytes, int maximumSaltBytes, Set<String> digestOids, Set<String> macOids) extends Record
Immutable PBM work and algorithm limits, checked before iterative derivation. Supported algorithms are SHA-256/384/512 and HMAC-SHA-256/384/512, expressed by standard OIDs. This policy owns no secret and grants no requester authority.
  • Constructor Details

    • CmpPbmPolicy

      public CmpPbmPolicy(int minimumIterations, int maximumIterations, int minimumSaltBytes, int maximumSaltBytes, Set<String> digestOids, Set<String> macOids)
      Validates and snapshots the bounded policy.
      Throws:
      IllegalArgumentException - if a work, salt or algorithm bound is invalid
      NullPointerException - if a set or its member is null
  • 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.
    • minimumIterations

      public int minimumIterations()
      Returns the value of the minimumIterations record component.
      Returns:
      the value of the minimumIterations record component
    • maximumIterations

      public int maximumIterations()
      Returns the value of the maximumIterations record component.
      Returns:
      the value of the maximumIterations record component
    • minimumSaltBytes

      public int minimumSaltBytes()
      Returns the value of the minimumSaltBytes record component.
      Returns:
      the value of the minimumSaltBytes record component
    • maximumSaltBytes

      public int maximumSaltBytes()
      Returns the value of the maximumSaltBytes record component.
      Returns:
      the value of the maximumSaltBytes record component
    • digestOids

      public Set<String> digestOids()
      Returns the value of the digestOids record component.
      Returns:
      the value of the digestOids record component
    • macOids

      public Set<String> macOids()
      Returns the value of the macOids record component.
      Returns:
      the value of the macOids record component