Package co.cryptoservice.sdk
Record Class Recipient
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.Recipient
- Record Components:
publicKey- the public key as hextype- the recipient typemlKemPublicKey- the ML-KEM public key as hex
One element of
recipients.-
Constructor Summary
ConstructorsConstructorDescriptionRecipient(String publicKey, RecipientType type, String mlKemPublicKey) Checks that every required member is present. -
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.Returns the value of themlKemPublicKeyrecord component.static Recipientof(String publicKey, RecipientType type) A request with only the required members; the optional ones are null.Returns the value of thepublicKeyrecord component.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.type()Returns the value of thetyperecord component.withMlKemPublicKey(String mlKemPublicKey) A copy withmlKemPublicKeyreplaced.
-
Constructor Details
-
Recipient
Checks that every required member is present.- Throws:
NullPointerException- when a required member is null
-
-
Method Details
-
of
A request with only the required members; the optional ones are null.- Parameters:
publicKey- the public key as hextype- the recipient type- Returns:
- the request
-
withMlKemPublicKey
A copy withmlKemPublicKeyreplaced.- Parameters:
mlKemPublicKey- the ML-KEM public key as hex- 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). -
publicKey
Returns the value of thepublicKeyrecord component.- Returns:
- the value of the
publicKeyrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
mlKemPublicKey
Returns the value of themlKemPublicKeyrecord component.- Returns:
- the value of the
mlKemPublicKeyrecord component
-