public class S3CryptoModuleAE extends S3CryptoModuleBase<com.amazonaws.services.s3.internal.crypto.v2.MultipartUploadCryptoContext>
contentCryptoScheme, cryptoConfig, DEFAULT_BUFFER_SIZE, kekMaterialsProvider, kms, log, multipartUploadContexts, s3
Constructor and Description |
---|
S3CryptoModuleAE(AWSKMS kms,
S3Direct s3,
AWSCredentialsProvider credentialsProvider,
EncryptionMaterialsProvider encryptionMaterialsProvider,
CryptoConfigurationV2 cryptoConfig) |
Modifier and Type | Method and Description |
---|---|
protected com.amazonaws.services.s3.internal.crypto.v2.S3ObjectWrapper |
adjustToDesiredRange(com.amazonaws.services.s3.internal.crypto.v2.S3ObjectWrapper s3object,
long[] range,
Map<String,String> instruction)
Adjusts the retrieved S3Object so that the object contents contain only the range of bytes
desired by the user.
|
protected long |
ciphertextLength(long originalContentLength)
Returns the length of the ciphertext computed from the length of the
plaintext.
|
S3Object |
getObjectSecurely(GetObjectRequest req) |
ObjectMetadata |
getObjectSecurely(GetObjectRequest getObjectRequest,
File destinationFile) |
protected boolean |
isRangeGetEnabled() |
protected boolean |
isStrict()
Returns true if a strict encryption mode is in use in the current crypto
module; false otherwise.
|
abortMultipartUploadSecurely, completeMultipartUploadSecurely, copyPartSecurely, createContentCryptoMaterial, createInstructionPutRequest, generateCEK, getCryptoConfiguration, getEncryptionMaterialsProvider, initiateMultipartUploadSecurely, newMultipartS3CipherInputStream, plaintextLength, putInstructionFileSecurely, putLocalObjectSecurely, putObjectSecurely, securityCheck, updateInstructionPutRequest, updateMetadataWithContentCryptoMaterial, uploadPartSecurely, wrapWithCipher
public S3CryptoModuleAE(AWSKMS kms, S3Direct s3, AWSCredentialsProvider credentialsProvider, EncryptionMaterialsProvider encryptionMaterialsProvider, CryptoConfigurationV2 cryptoConfig)
cryptoConfig
- a read-only copy of the crypto configuration.protected boolean isStrict()
public S3Object getObjectSecurely(GetObjectRequest req)
getObjectSecurely
in class S3CryptoModule<com.amazonaws.services.s3.internal.crypto.v2.MultipartUploadCryptoContext>
protected final com.amazonaws.services.s3.internal.crypto.v2.S3ObjectWrapper adjustToDesiredRange(com.amazonaws.services.s3.internal.crypto.v2.S3ObjectWrapper s3object, long[] range, Map<String,String> instruction)
s3object
- The S3Object retrieved from S3 that could possibly contain more bytes than desired
by the user.range
- A two-element array of longs corresponding to the start and finish (inclusive) of a desired
range of bytes.instruction
- Instruction file in JSON or null if no instruction file is involvedpublic ObjectMetadata getObjectSecurely(GetObjectRequest getObjectRequest, File destinationFile)
getObjectSecurely
in class S3CryptoModule<com.amazonaws.services.s3.internal.crypto.v2.MultipartUploadCryptoContext>
protected final long ciphertextLength(long originalContentLength)
S3CryptoModuleBase
ciphertextLength
in class S3CryptoModuleBase<com.amazonaws.services.s3.internal.crypto.v2.MultipartUploadCryptoContext>
originalContentLength
- a non-negative numberprotected boolean isRangeGetEnabled()
Copyright © 2023. All rights reserved.