Package edu.ucsb.cs.scaffold.services
Record Class PatEncryptionService.EncryptedPat
java.lang.Object
java.lang.Record
edu.ucsb.cs.scaffold.services.PatEncryptionService.EncryptedPat
- Enclosing class:
PatEncryptionService
public static record PatEncryptionService.EncryptedPat(String ciphertext, int keyVersion)
extends Record
Result of encrypting a PAT: the base64 ciphertext and the key version that produced it.
-
Constructor Summary
ConstructorsConstructorDescriptionEncryptedPat(String ciphertext, int keyVersion) Creates an instance of aEncryptedPatrecord 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
-
EncryptedPat
Creates an instance of aEncryptedPatrecord 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
-