Record Class Pbkdf2Limits
java.lang.Object
java.lang.Record
zeroecho.sdk.Pbkdf2Limits
- Record Components:
operationalMaximum- largest iteration count accepted from trusted local configurationabsoluteDecodedMaximum- hard safety ceiling for untrusted decoded data
Explicit PBKDF2 work-factor limits for trusted configuration and decoded
data.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMandatory minimum PBKDF2 iteration count. -
Constructor Summary
ConstructorsConstructorDescriptionPbkdf2Limits(int operationalMaximum, int absoluteDecodedMaximum) Validatesminimum <= operationalMaximum <= absoluteDecodedMaximum. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theabsoluteDecodedMaximumrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theoperationalMaximumrecord component.final StringtoString()Returns a string representation of this record class.voidvalidateDecoded(int iterations) Validates an untrusted decoded iteration count before KDF execution.voidvalidateTrusted(int iterations) Validates trusted local configuration.
-
Field Details
-
MINIMUM
public static final int MINIMUMMandatory minimum PBKDF2 iteration count.- See Also:
-
-
Constructor Details
-
Pbkdf2Limits
public Pbkdf2Limits(int operationalMaximum, int absoluteDecodedMaximum) Validatesminimum <= 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
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
operationalMaximum
public int operationalMaximum()Returns the value of theoperationalMaximumrecord component.- Returns:
- the value of the
operationalMaximumrecord component
-
absoluteDecodedMaximum
public int absoluteDecodedMaximum()Returns the value of theabsoluteDecodedMaximumrecord component.- Returns:
- the value of the
absoluteDecodedMaximumrecord component
-