public abstract class ServerSideEncryption extends Object implements Destroyable
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerSideEncryption.Type
The types of server-side encryption.
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
destroyed |
| Constructor and Description |
|---|
ServerSideEncryption() |
| Modifier and Type | Method and Description |
|---|---|
static ServerSideEncryption |
atRest()
Create a new server-side-encryption object for encryption at rest (a.k.a.
|
Map<String,String> |
copySourceHeaders()
Returns server side encryption headers for source object in Put Object - Copy.
|
abstract Map<String,String> |
headers()
Returns server side encryption headers.
|
boolean |
isDestroyed() |
abstract ServerSideEncryption.Type |
type()
Returns server side encryption type.
|
static ServerSideEncryptionCustomerKey |
withCustomerKey(SecretKey key)
Create a new server-side-encryption object for encryption with customer provided keys (a.k.a.
|
static ServerSideEncryption |
withManagedKeys(String keyId,
Map<String,String> context)
Create a new server-side-encryption object for encryption using a KMS (a.k.a.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroypublic abstract ServerSideEncryption.Type type()
public Map<String,String> copySourceHeaders() throws IllegalArgumentException
IllegalArgumentExceptionpublic boolean isDestroyed()
isDestroyed in interface Destroyablepublic static ServerSideEncryptionCustomerKey withCustomerKey(SecretKey key) throws InvalidKeyException, NoSuchAlgorithmException
key - The secret AES-256 key.InvalidKeyException - if the provided secret key is not a 256 bit AES key.NoSuchAlgorithmException - if the crypto provider does not implement MD5.public static ServerSideEncryption atRest()
public static ServerSideEncryption withManagedKeys(String keyId, Map<String,String> context) throws IllegalArgumentException, UnsupportedEncodingException
keyId - specifies the customer-master-key (CMK) and must not be null.context - is the encryption context. If the context is null no context is used.IllegalArgumentExceptionUnsupportedEncodingException