Package co.cryptoservice.sdk
Record Class KmsDecryptResult
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KmsDecryptResult
- Record Components:
hex- the decrypted bytes; lowercase hexkeyId- the provider's key identifier (local keys: local-<hex>)plaintext- the decrypted bytes, decoded as UTF-8 (invalid sequences become U+FFFD); UTF-8 textprovider- the provider that served the request (local, aws, gcp, vault)
public record KmsDecryptResult(String hex, String keyId, String plaintext, String provider)
extends Record
What
POST /v2/kms/decrypt answers: decrypt ciphertext with a managed KMS key.-
Constructor Summary
ConstructorsConstructorDescriptionKmsDecryptResult(String hex, String keyId, String plaintext, String provider) Creates an instance of aKmsDecryptResultrecord 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.hex()Returns the value of thehexrecord component.byte[]hexBytes()hex()decoded from hex.keyId()Returns the value of thekeyIdrecord component.Returns the value of theplaintextrecord component.provider()Returns the value of theproviderrecord component.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.
-
Constructor Details
-
Method Details
-
hexBytes
public byte[] hexBytes()hex()decoded from hex.- Returns:
- the bytes, or null when
hexis 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). -
hex
Returns the value of thehexrecord component.- Returns:
- the value of the
hexrecord component
-
keyId
Returns the value of thekeyIdrecord component.- Returns:
- the value of the
keyIdrecord component
-
plaintext
Returns the value of theplaintextrecord component.- Returns:
- the value of the
plaintextrecord component
-
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-