Record Class CmpPbmPolicy
java.lang.Object
java.lang.Record
zeroecho.pkix.cmp.CmpPbmPolicy
- Record Components:
minimumIterations- positive work floormaximumIterations- work ceiling, at most one millionminimumSaltBytes- salt floor, at least sixteenmaximumSaltBytes- salt ceiling, at most sixty-fourdigestOids- nonempty allowed standard digest OIDsmacOids- 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 Summary
ConstructorsConstructorDescriptionCmpPbmPolicy(int minimumIterations, int maximumIterations, int minimumSaltBytes, int maximumSaltBytes, Set<String> digestOids, Set<String> macOids) Validates and snapshots the bounded policy. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedigestOidsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.macOids()Returns the value of themacOidsrecord component.intReturns the value of themaximumIterationsrecord component.intReturns the value of themaximumSaltBytesrecord component.intReturns the value of theminimumIterationsrecord component.intReturns the value of theminimumSaltBytesrecord component.final StringtoString()Returns a string representation of this record class.
-
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 invalidNullPointerException- if a set or its member is null
-
-
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. -
minimumIterations
public int minimumIterations()Returns the value of theminimumIterationsrecord component.- Returns:
- the value of the
minimumIterationsrecord component
-
maximumIterations
public int maximumIterations()Returns the value of themaximumIterationsrecord component.- Returns:
- the value of the
maximumIterationsrecord component
-
minimumSaltBytes
public int minimumSaltBytes()Returns the value of theminimumSaltBytesrecord component.- Returns:
- the value of the
minimumSaltBytesrecord component
-
maximumSaltBytes
public int maximumSaltBytes()Returns the value of themaximumSaltBytesrecord component.- Returns:
- the value of the
maximumSaltBytesrecord component
-
digestOids
Returns the value of thedigestOidsrecord component.- Returns:
- the value of the
digestOidsrecord component
-
macOids
-