Package co.cryptoservice.sdk
Record Class HpkeOpenResult
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.HpkeOpenResult
- Record Components:
hex- the decrypted bytes; lowercase hexplaintext- the decrypted bytes, decoded as UTF-8 (invalid sequences become U+FFFD); UTF-8 text
What
POST /v2/hpke/open answers: decrypt (open) an HPKE ciphertext with a server-held
key.-
Constructor Summary
ConstructorsConstructorDescriptionHpkeOpenResult(String hex, String plaintext) Creates an instance of aHpkeOpenResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hex()Returns the value of thehexrecord component.byte[]hexBytes()hex()decoded from hex.Returns the value of theplaintextrecord component.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.
-
Constructor Details
-
Method Details
-
hexBytes
public byte[] hexBytes()hex()decoded from hex.- Returns:
- the bytes, or null when
hexis absent - Throws:
IllegalArgumentException- when the server sent malformed hex
-
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). -
hex
Returns the value of thehexrecord component.- Returns:
- the value of the
hexrecord component
-
plaintext
Returns the value of theplaintextrecord component.- Returns:
- the value of the
plaintextrecord component
-