public class EncryptRequest extends AmazonWebServiceRequest implements Serializable
Encrypt operation.
Encrypts plaintext into ciphertext by using a customer master key.
NOOP| Constructor and Description |
|---|
EncryptRequest() |
| Modifier and Type | Method and Description |
|---|---|
EncryptRequest |
addEncryptionContextEntry(String key,
String value)
Name:value pair that specifies the encryption context to be used for
authenticated encryption.
|
EncryptRequest |
clearEncryptionContextEntries()
Removes all the entries added into EncryptionContext.
|
boolean |
equals(Object obj) |
Map<String,String> |
getEncryptionContext()
Name:value pair that specifies the encryption context to be used for
authenticated encryption.
|
List<String> |
getGrantTokens()
A list of grant tokens that represent grants which can be used to
provide long term permissions to perform encryption.
|
String |
getKeyId()
Unique identifier of the customer master.
|
ByteBuffer |
getPlaintext()
Data to be encrypted.
|
int |
hashCode() |
void |
setEncryptionContext(Map<String,String> encryptionContext)
Name:value pair that specifies the encryption context to be used for
authenticated encryption.
|
void |
setGrantTokens(Collection<String> grantTokens)
A list of grant tokens that represent grants which can be used to
provide long term permissions to perform encryption.
|
void |
setKeyId(String keyId)
Unique identifier of the customer master.
|
void |
setPlaintext(ByteBuffer plaintext)
Data to be encrypted.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
EncryptRequest |
withEncryptionContext(Map<String,String> encryptionContext)
Name:value pair that specifies the encryption context to be used for
authenticated encryption.
|
EncryptRequest |
withGrantTokens(Collection<String> grantTokens)
A list of grant tokens that represent grants which can be used to
provide long term permissions to perform encryption.
|
EncryptRequest |
withGrantTokens(String... grantTokens)
A list of grant tokens that represent grants which can be used to
provide long term permissions to perform encryption.
|
EncryptRequest |
withKeyId(String keyId)
Unique identifier of the customer master.
|
EncryptRequest |
withPlaintext(ByteBuffer plaintext)
Data to be encrypted.
|
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic String getKeyId()
Constraints:
Length: 1 - 256
public void setKeyId(String keyId)
Constraints:
Length: 1 - 256
keyId - Unique identifier of the customer master. This can be an ARN, an
alias, or the Key ID.public EncryptRequest withKeyId(String keyId)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
keyId - Unique identifier of the customer master. This can be an ARN, an
alias, or the Key ID.public ByteBuffer getPlaintext()
Constraints:
Length: 1 - 4096
public void setPlaintext(ByteBuffer plaintext)
Constraints:
Length: 1 - 4096
plaintext - Data to be encrypted.public EncryptRequest withPlaintext(ByteBuffer plaintext)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 4096
plaintext - Data to be encrypted.public Map<String,String> getEncryptionContext()
public void setEncryptionContext(Map<String,String> encryptionContext)
encryptionContext - Name:value pair that specifies the encryption context to be used for
authenticated encryption. For more information, see Authenticated
Encryption.public EncryptRequest withEncryptionContext(Map<String,String> encryptionContext)
Returns a reference to this object so that method calls can be chained together.
encryptionContext - Name:value pair that specifies the encryption context to be used for
authenticated encryption. For more information, see Authenticated
Encryption.public EncryptRequest addEncryptionContextEntry(String key, String value)
The method adds a new key-value pair into EncryptionContext parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into EncryptionContext.value - The corresponding value of the entry to be added into EncryptionContext.public EncryptRequest clearEncryptionContextEntries()
Returns a reference to this object so that method calls can be chained together.
public List<String> getGrantTokens()
Constraints:
Length: 0 - 10
public void setGrantTokens(Collection<String> grantTokens)
Constraints:
Length: 0 - 10
grantTokens - A list of grant tokens that represent grants which can be used to
provide long term permissions to perform encryption.public EncryptRequest withGrantTokens(String... grantTokens)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
grantTokens - A list of grant tokens that represent grants which can be used to
provide long term permissions to perform encryption.public EncryptRequest withGrantTokens(Collection<String> grantTokens)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
grantTokens - A list of grant tokens that represent grants which can be used to
provide long term permissions to perform encryption.public String toString()
toString in class ObjectObject.toString()Copyright © 2014. All rights reserved.