Package co.cryptoservice.sdk
Record Class HpkeSealRequest
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.HpkeSealRequest
- Record Components:
recipientPublicKey- the recipient's public key as hexplaintext- the plaintext, as UTF-8 textkem- the KEM, or null for the server defaultaead- 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 HpkeSealRequest(String recipientPublicKey, String plaintext, HpkeKem kem, HpkeAead aead, String info, String aad, String psk, String pskId)
extends Record
The body of
POST /v2/hpke/seal.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaad()Returns the value of theaadrecord component.aead()Returns the value of theaeadrecord 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.kem()Returns the value of thekemrecord component.static HpkeSealRequestA request with only the required members; the optional ones are null.Returns the value of theplaintextrecord component.psk()Returns the value of thepskrecord component.pskId()Returns the value of thepskIdrecord component.Returns the value of therecipientPublicKeyrecord 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 withkemreplaced.A copy withpskreplaced.A copy withpskIdreplaced.
-
Constructor Details
-
Method Details
-
of
A request with only the required members; the optional ones are null.- Parameters:
recipientPublicKey- the recipient's public key as hexplaintext- the plaintext, as UTF-8 text- Returns:
- the request
-
withKem
A copy withkemreplaced.- Parameters:
kem- the KEM, or null for the server default- Returns:
- the new 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). -
recipientPublicKey
Returns the value of therecipientPublicKeyrecord component.- Returns:
- the value of the
recipientPublicKeyrecord component
-
plaintext
Returns the value of theplaintextrecord component.- Returns:
- the value of the
plaintextrecord component
-
kem
Returns the value of thekemrecord component.- Returns:
- the value of the
kemrecord 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
-