Package co.cryptoservice.sdk
Record Class KmsEncryptResult
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KmsEncryptResult
- Record Components:
ciphertext- the ciphertext; opaque, provider-specific string; pass it back unchangedkeyId- the provider's key identifier (local keys: local-<hex>)provider- the provider that served the request (local, aws, gcp, vault)context- encryption context, when the provider echoes it, or null when absentkeyVersion- key version used, when versioned, or null when absent
public record KmsEncryptResult(String ciphertext, String keyId, String provider, Map<String,String> context, Integer keyVersion)
extends Record
What
POST /v2/kms/encrypt answers: encrypt plaintext with a managed KMS key.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theciphertextrecord component.context()Returns the value of thecontextrecord component.final 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.Returns the value of thekeyVersionrecord 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
-
KmsEncryptResult
public KmsEncryptResult(String ciphertext, String keyId, String provider, Map<String, String> context, Integer keyVersion) Creates an instance of aKmsEncryptResultrecord class.- Parameters:
ciphertext- the value for theciphertextrecord componentkeyId- the value for thekeyIdrecord componentprovider- the value for theproviderrecord componentcontext- the value for thecontextrecord componentkeyVersion- the value for thekeyVersionrecord component
-
-
Method Details
-
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). -
ciphertext
Returns the value of theciphertextrecord component.- Returns:
- the value of the
ciphertextrecord component
-
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
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
keyVersion
Returns the value of thekeyVersionrecord component.- Returns:
- the value of the
keyVersionrecord component
-