public class GenerateDataKeyResult extends Object implements Serializable, Cloneable
Constructor and Description |
---|
GenerateDataKeyResult() |
Modifier and Type | Method and Description |
---|---|
GenerateDataKeyResult |
clone() |
boolean |
equals(Object obj) |
ByteBuffer |
getCiphertextBlob()
Ciphertext that contains the encrypted data key.
|
String |
getKeyId()
System generated unique identifier of the key to be used to decrypt the
encrypted copy of the data key.
|
ByteBuffer |
getPlaintext()
Plaintext that contains the data key.
|
int |
hashCode() |
void |
setCiphertextBlob(ByteBuffer ciphertextBlob)
Ciphertext that contains the encrypted data key.
|
void |
setKeyId(String keyId)
System generated unique identifier of the key to be used to decrypt the
encrypted copy of the data key.
|
void |
setPlaintext(ByteBuffer plaintext)
Plaintext that contains the data key.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GenerateDataKeyResult |
withCiphertextBlob(ByteBuffer ciphertextBlob)
Ciphertext that contains the encrypted data key.
|
GenerateDataKeyResult |
withKeyId(String keyId)
System generated unique identifier of the key to be used to decrypt the
encrypted copy of the data key.
|
GenerateDataKeyResult |
withPlaintext(ByteBuffer plaintext)
Plaintext that contains the data key.
|
public void setCiphertextBlob(ByteBuffer ciphertextBlob)
Ciphertext that contains the encrypted data key. You must store the blob and enough information to reconstruct the encryption context so that the data encrypted by using the key can later be decrypted. You must provide both the ciphertext blob and the encryption context to the Decrypt API to recover the plaintext data key and decrypt the object.
If you are using the CLI, the value is Base64 encoded. Otherwise, it is not encoded.
ciphertextBlob
- Ciphertext that contains the encrypted data key. You must store
the blob and enough information to reconstruct the encryption
context so that the data encrypted by using the key can later be
decrypted. You must provide both the ciphertext blob and the
encryption context to the Decrypt API to recover the
plaintext data key and decrypt the object.
If you are using the CLI, the value is Base64 encoded. Otherwise, it is not encoded.
public ByteBuffer getCiphertextBlob()
Ciphertext that contains the encrypted data key. You must store the blob and enough information to reconstruct the encryption context so that the data encrypted by using the key can later be decrypted. You must provide both the ciphertext blob and the encryption context to the Decrypt API to recover the plaintext data key and decrypt the object.
If you are using the CLI, the value is Base64 encoded. Otherwise, it is not encoded.
ByteBuffer
s are stateful. Calling their get
methods
changes their position
. We recommend using
ByteBuffer.asReadOnlyBuffer()
to create a read-only view
of the buffer with an independent position
, and calling
get
methods on this rather than directly on the returned
ByteBuffer
. Doing so will ensure that anyone else using the
ByteBuffer
will not be affected by changes to the position
.
If you are using the CLI, the value is Base64 encoded. Otherwise, it is not encoded.
public GenerateDataKeyResult withCiphertextBlob(ByteBuffer ciphertextBlob)
Ciphertext that contains the encrypted data key. You must store the blob and enough information to reconstruct the encryption context so that the data encrypted by using the key can later be decrypted. You must provide both the ciphertext blob and the encryption context to the Decrypt API to recover the plaintext data key and decrypt the object.
If you are using the CLI, the value is Base64 encoded. Otherwise, it is not encoded.
ciphertextBlob
- Ciphertext that contains the encrypted data key. You must store
the blob and enough information to reconstruct the encryption
context so that the data encrypted by using the key can later be
decrypted. You must provide both the ciphertext blob and the
encryption context to the Decrypt API to recover the
plaintext data key and decrypt the object.
If you are using the CLI, the value is Base64 encoded. Otherwise, it is not encoded.
public void setPlaintext(ByteBuffer plaintext)
Plaintext that contains the data key. Use this for encryption and decryption and then remove it from memory as soon as possible.
plaintext
- Plaintext that contains the data key. Use this for encryption and
decryption and then remove it from memory as soon as possible.public ByteBuffer getPlaintext()
Plaintext that contains the data key. Use this for encryption and decryption and then remove it from memory as soon as possible.
ByteBuffer
s are stateful. Calling their get
methods
changes their position
. We recommend using
ByteBuffer.asReadOnlyBuffer()
to create a read-only view
of the buffer with an independent position
, and calling
get
methods on this rather than directly on the returned
ByteBuffer
. Doing so will ensure that anyone else using the
ByteBuffer
will not be affected by changes to the position
.
public GenerateDataKeyResult withPlaintext(ByteBuffer plaintext)
Plaintext that contains the data key. Use this for encryption and decryption and then remove it from memory as soon as possible.
plaintext
- Plaintext that contains the data key. Use this for encryption and
decryption and then remove it from memory as soon as possible.public void setKeyId(String keyId)
System generated unique identifier of the key to be used to decrypt the encrypted copy of the data key.
keyId
- System generated unique identifier of the key to be used to
decrypt the encrypted copy of the data key.public String getKeyId()
System generated unique identifier of the key to be used to decrypt the encrypted copy of the data key.
public GenerateDataKeyResult withKeyId(String keyId)
System generated unique identifier of the key to be used to decrypt the encrypted copy of the data key.
keyId
- System generated unique identifier of the key to be used to
decrypt the encrypted copy of the data key.public String toString()
toString
in class Object
Object.toString()
public GenerateDataKeyResult clone()
Copyright © 2015. All rights reserved.