Package co.cryptoservice.sdk
Record Class KmsUnwrapResult
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KmsUnwrapResult
- Record Components:
keyId- the provider's key identifier (local keys: local-<hex>)provider- the provider that served the request (local, aws, gcp, vault)unwrappedKey- the unwrapped key bytes; lowercase hex
What
POST /v2/kms/unwrap answers: unwrap a wrapped key using a managed KMS key.-
Constructor Summary
ConstructorsConstructorDescriptionKmsUnwrapResult(String keyId, String provider, String unwrappedKey) Creates an instance of aKmsUnwrapResultrecord 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.keyId()Returns the value of thekeyIdrecord component.provider()Returns the value of theproviderrecord component.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.Returns the value of theunwrappedKeyrecord component.byte[]unwrappedKey()decoded from hex.
-
Constructor Details
-
KmsUnwrapResult
Creates an instance of aKmsUnwrapResultrecord class.- Parameters:
keyId- the value for thekeyIdrecord componentprovider- the value for theproviderrecord componentunwrappedKey- the value for theunwrappedKeyrecord component
-
-
Method Details
-
unwrappedKeyBytes
public byte[] unwrappedKeyBytes()unwrappedKey()decoded from hex.- Returns:
- the bytes, or null when
unwrappedKeyis 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). -
keyId
Returns the value of thekeyIdrecord component.- Returns:
- the value of the
keyIdrecord component
-
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
unwrappedKey
Returns the value of theunwrappedKeyrecord component.- Returns:
- the value of the
unwrappedKeyrecord component
-