Package co.cryptoservice.sdk
Record Class KeyWrapRequest
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KeyWrapRequest
- Record Components:
kek- the key-encryption key as hexkeyToWrap- the key to wrap, as hexalgorithm- the algorithm
public record KeyWrapRequest(String kek, String keyToWrap, KeyWrapAlgorithm algorithm)
extends Record
The body of
POST /v2/keys/wrap.-
Constructor Summary
ConstructorsConstructorDescriptionKeyWrapRequest(String kek, String keyToWrap, KeyWrapAlgorithm algorithm) Checks that every required member is present. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kek()Returns the value of thekekrecord component.Returns the value of thekeyToWraprecord component.static KeyWrapRequestA request with only the required members; the optional ones are null.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.withAlgorithm(KeyWrapAlgorithm algorithm) A copy withalgorithmreplaced.
-
Constructor Details
-
KeyWrapRequest
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:
kek- the key-encryption key as hexkeyToWrap- the key to wrap, as hex- Returns:
- the request
-
withAlgorithm
A copy withalgorithmreplaced.- Parameters:
algorithm- the algorithm- 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). -
kek
Returns the value of thekekrecord component.- Returns:
- the value of the
kekrecord component
-
keyToWrap
Returns the value of thekeyToWraprecord component.- Returns:
- the value of the
keyToWraprecord component
-
algorithm
Returns the value of thealgorithmrecord component.- Returns:
- the value of the
algorithmrecord component
-