Package co.cryptoservice.sdk
Record Class SecretboxSealRequest
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.SecretboxSealRequest
- Record Components:
key- the 256-bit key as hex (64 characters)plaintext- the plaintext, as UTF-8 textaad- additional authenticated data, or null
The body of
POST /v2/secretbox/seal.-
Constructor Summary
ConstructorsConstructorDescriptionSecretboxSealRequest(String key, String plaintext, String aad) Checks that every required member is present. -
Method Summary
Modifier and TypeMethodDescriptionaad()Returns the value of theaadrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.static SecretboxSealRequestA request with only the required members; the optional ones are null.Returns the value of theplaintextrecord component.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.A copy withaadreplaced.
-
Constructor Details
-
SecretboxSealRequest
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:
key- the 256-bit key as hex (64 characters)plaintext- the plaintext, as UTF-8 text- Returns:
- the request
-
withAad
A copy withaadreplaced.- Parameters:
aad- additional authenticated data, 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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
plaintext
Returns the value of theplaintextrecord component.- Returns:
- the value of the
plaintextrecord component
-
aad
Returns the value of theaadrecord component.- Returns:
- the value of the
aadrecord component
-