Package co.cryptoservice.sdk
Record Class HpkeOpenRequest
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.HpkeOpenRequest
- Record Components:
keyId- the server-held key's identifierencapsulatedKey- the HPKE encapsulated key as hexciphertext- the ciphertext, as the server returned itaead- the AEAD, or null for the server defaultinfo- the HPKE info, or nullaad- additional authenticated data, or nullpsk- the pre-shared key, or nullpskId- the pre-shared key identifier, or null
public record HpkeOpenRequest(String keyId, String encapsulatedKey, String ciphertext, HpkeAead aead, String info, String aad, String psk, String pskId)
extends Record
The body of
POST /v2/hpke/open.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaad()Returns the value of theaadrecord component.aead()Returns the value of theaeadrecord component.Returns the value of theciphertextrecord component.Returns the value of theencapsulatedKeyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.info()Returns the value of theinforecord component.keyId()Returns the value of thekeyIdrecord component.static HpkeOpenRequestA request with only the required members; the optional ones are null.psk()Returns the value of thepskrecord component.pskId()Returns the value of thepskIdrecord component.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.A copy withaadreplaced.A copy withaeadreplaced.A copy withinforeplaced.A copy withpskreplaced.A copy withpskIdreplaced.
-
Constructor Details
-
Method Details
-
of
A request with only the required members; the optional ones are null.- Parameters:
keyId- the server-held key's identifierencapsulatedKey- the HPKE encapsulated key as hexciphertext- the ciphertext, as the server returned it- Returns:
- the request
-
withAead
A copy withaeadreplaced.- Parameters:
aead- the AEAD, or null for the server default- Returns:
- the new request
-
withInfo
A copy withinforeplaced.- Parameters:
info- the HPKE info, or null- Returns:
- the new request
-
withAad
A copy withaadreplaced.- Parameters:
aad- additional authenticated data, or null- Returns:
- the new request
-
withPsk
A copy withpskreplaced.- Parameters:
psk- the pre-shared key, or null- Returns:
- the new request
-
withPskId
A copy withpskIdreplaced.- Parameters:
pskId- the pre-shared key identifier, or null- Returns:
- the new request
-
toString
Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
keyId
Returns the value of thekeyIdrecord component.- Returns:
- the value of the
keyIdrecord component
-
encapsulatedKey
Returns the value of theencapsulatedKeyrecord component.- Returns:
- the value of the
encapsulatedKeyrecord component
-
ciphertext
Returns the value of theciphertextrecord component.- Returns:
- the value of the
ciphertextrecord component
-
aead
Returns the value of theaeadrecord component.- Returns:
- the value of the
aeadrecord component
-
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
aad
Returns the value of theaadrecord component.- Returns:
- the value of the
aadrecord component
-
psk
Returns the value of thepskrecord component.- Returns:
- the value of the
pskrecord component
-
pskId
Returns the value of thepskIdrecord component.- Returns:
- the value of the
pskIdrecord component
-