Package page.codeberg.friedolyn.crypto
Record Class Cryptor.KeyDerivationResult
java.lang.Object
java.lang.Record
page.codeberg.friedolyn.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[] derivedKey, Argon2Configuration argon2Configuration)
extends Record
The result of a key derivation operation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Argon2Configuration
The field for theargon2Configuration
record component.private final byte[]
The field for thederivedKey
record component. -
Constructor Summary
ConstructorsConstructorDescriptionKeyDerivationResult
(byte[] derivedKey, Argon2Configuration argon2Configuration) Creates an instance of aKeyDerivationResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargon2Configuration
record component.byte[]
Returns the value of thederivedKey
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
derivedKey
private final byte[] derivedKeyThe field for thederivedKey
record component. -
argon2Configuration
The field for theargon2Configuration
record component.
-
-
Constructor Details
-
KeyDerivationResult
Creates an instance of aKeyDerivationResult
record class.- Parameters:
derivedKey
- the value for thederivedKey
record componentargon2Configuration
- the value for theargon2Configuration
record 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[] derivedKey()Returns the value of thederivedKey
record component.- Returns:
- the value of the
derivedKey
record component
-
argon2Configuration
Returns the value of theargon2Configuration
record component.- Returns:
- the value of the
argon2Configuration
record component
-