public class DecryptRequest extends AmazonWebServiceRequest implements java.io.Serializable
Decrypts ciphertext. Ciphertext is plaintext that has been previously encrypted by using any of the following functions:
Note that if a caller has been granted access permissions to all keys
(through, for example, IAM user policies that grant Decrypt
permission on all resources), then ciphertext encrypted by using keys in
other accounts where the key grants access to the caller can be decrypted. To
remedy this, we recommend that you do not grant Decrypt
access
in an IAM user policy. Instead grant Decrypt
access only in key
policies. If you must grant Decrypt
access in an IAM user
policy, you should scope the resource to specific keys or to specific trusted
accounts.
Constructor and Description |
---|
DecryptRequest() |
Modifier and Type | Method and Description |
---|---|
DecryptRequest |
addEncryptionContextEntry(java.lang.String key,
java.lang.String value)
The encryption context.
|
DecryptRequest |
clearEncryptionContextEntries()
Removes all the entries added into EncryptionContext.
|
boolean |
equals(java.lang.Object obj) |
java.nio.ByteBuffer |
getCiphertextBlob()
Ciphertext to be decrypted.
|
java.util.Map<java.lang.String,java.lang.String> |
getEncryptionContext()
The encryption context.
|
java.util.List<java.lang.String> |
getGrantTokens()
A list of grant tokens.
|
int |
hashCode() |
void |
setCiphertextBlob(java.nio.ByteBuffer ciphertextBlob)
Ciphertext to be decrypted.
|
void |
setEncryptionContext(java.util.Map<java.lang.String,java.lang.String> encryptionContext)
The encryption context.
|
void |
setGrantTokens(java.util.Collection<java.lang.String> grantTokens)
A list of grant tokens.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DecryptRequest |
withCiphertextBlob(java.nio.ByteBuffer ciphertextBlob)
Ciphertext to be decrypted.
|
DecryptRequest |
withEncryptionContext(java.util.Map<java.lang.String,java.lang.String> encryptionContext)
The encryption context.
|
DecryptRequest |
withGrantTokens(java.util.Collection<java.lang.String> grantTokens)
A list of grant tokens.
|
DecryptRequest |
withGrantTokens(java.lang.String... grantTokens)
A list of grant tokens.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.nio.ByteBuffer getCiphertextBlob()
Ciphertext to be decrypted. The blob includes metadata.
Constraints:
Length: 1 - 6144
Ciphertext to be decrypted. The blob includes metadata.
public void setCiphertextBlob(java.nio.ByteBuffer ciphertextBlob)
Ciphertext to be decrypted. The blob includes metadata.
Constraints:
Length: 1 - 6144
ciphertextBlob
- Ciphertext to be decrypted. The blob includes metadata.
public DecryptRequest withCiphertextBlob(java.nio.ByteBuffer ciphertextBlob)
Ciphertext to be decrypted. The blob includes metadata.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 6144
ciphertextBlob
- Ciphertext to be decrypted. The blob includes metadata.
public java.util.Map<java.lang.String,java.lang.String> getEncryptionContext()
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
public void setEncryptionContext(java.util.Map<java.lang.String,java.lang.String> encryptionContext)
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
encryptionContext
- The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
public DecryptRequest withEncryptionContext(java.util.Map<java.lang.String,java.lang.String> encryptionContext)
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
Returns a reference to this object so that method calls can be chained together.
encryptionContext
- The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
public DecryptRequest addEncryptionContextEntry(java.lang.String key, java.lang.String value)
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
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 DecryptRequest clearEncryptionContextEntries()
Returns a reference to this object so that method calls can be chained together.
public java.util.List<java.lang.String> getGrantTokens()
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
public void setGrantTokens(java.util.Collection<java.lang.String> grantTokens)
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
grantTokens
- A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
public DecryptRequest withGrantTokens(java.lang.String... grantTokens)
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
Returns a reference to this object so that method calls can be chained together.
grantTokens
- A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
public DecryptRequest withGrantTokens(java.util.Collection<java.lang.String> grantTokens)
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
Returns a reference to this object so that method calls can be chained together.
grantTokens
- A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.