Package codes.grow.packages.vault
Record Class Ciphertext
java.lang.Object
java.lang.Record
codes.grow.packages.vault.Ciphertext
- Record Components:
ciphertext-vault:v<keyVersion>:<base64>keyVersion- key version used
A transit ciphertext.
-
Constructor Summary
ConstructorsConstructorDescriptionCiphertext(String ciphertext, int keyVersion) Creates an instance of aCiphertextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theciphertextrecord 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 thekeyVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Ciphertext
Creates an instance of aCiphertextrecord class.- Parameters:
ciphertext- the value for theciphertextrecord componentkeyVersion- the value for thekeyVersionrecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
ciphertext
Returns the value of theciphertextrecord component.- Returns:
- the value of the
ciphertextrecord component
-
keyVersion
public int keyVersion()Returns the value of thekeyVersionrecord component.- Returns:
- the value of the
keyVersionrecord component
-