Package co.cryptoservice.sdk
Record Class KeyUnwrapRequest
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KeyUnwrapRequest
- Record Components:
kek- the key-encryption key as hexwrappedKey- the wrapped key, as the server returned italgorithm- the algorithm
public record KeyUnwrapRequest(String kek, String wrappedKey, KeyWrapAlgorithm algorithm)
extends Record
The body of
POST /v2/keys/unwrap.-
Constructor Summary
ConstructorsConstructorDescriptionKeyUnwrapRequest(String kek, String wrappedKey, 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.static KeyUnwrapRequestA 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.Returns the value of thewrappedKeyrecord component.
-
Constructor Details
-
KeyUnwrapRequest
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 hexwrappedKey- the wrapped key, as the server returned it- 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
-
wrappedKey
Returns the value of thewrappedKeyrecord component.- Returns:
- the value of the
wrappedKeyrecord component
-
algorithm
Returns the value of thealgorithmrecord component.- Returns:
- the value of the
algorithmrecord component
-