Record Class Cryptor.KeyDerivationResult
java.lang.Object
java.lang.Record
de.gustavblass.commons.crypto.Cryptor.KeyDerivationResult
- Record Components:
derivedKey- The encryption secret that was derived from some human-readable password.argon2Configuration- The Argon2 parameters that were used to derive the key.
- Enclosing class:
Cryptor
public static record Cryptor.KeyDerivationResult(byte @NonNull [] derivedKey, Argon2Configuration argon2Configuration)
extends Record
The result of a key derivation operation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Argon2ConfigurationThe field for theargon2Configurationrecord component.private final byte @NonNull []The field for thederivedKeyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionKeyDerivationResult(byte @NonNull [] derivedKey, Argon2Configuration argon2Configuration) Creates an instance of aKeyDerivationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargon2Configurationrecord component.byte @NonNull []Returns the value of thederivedKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
derivedKey
private final byte @NonNull [] derivedKeyThe field for thederivedKeyrecord component. -
argon2Configuration
The field for theargon2Configurationrecord component.
-
-
Constructor Details
-
KeyDerivationResult
Creates an instance of aKeyDerivationResultrecord class.- Parameters:
derivedKey- the value for thederivedKeyrecord componentargon2Configuration- the value for theargon2Configurationrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
derivedKey
public byte @NonNull [] derivedKey()Returns the value of thederivedKeyrecord component.- Returns:
- the value of the
derivedKeyrecord component
-
argon2Configuration
Returns the value of theargon2Configurationrecord component.- Returns:
- the value of the
argon2Configurationrecord component
-