public class EncryptionUtils extends Object
Constructor and Description |
---|
EncryptionUtils() |
Modifier and Type | Method and Description |
---|---|
static S3Object |
adjustOutputToDesiredRange(S3Object object,
long[] range)
Deprecated.
no longer used and will be removed in the future
|
static EncryptionInstruction |
buildInstruction(EncryptionMaterials materials,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static EncryptionInstruction |
buildInstructionFromInstructionFile(S3Object instructionFile,
EncryptionMaterials materials,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static EncryptionInstruction |
buildInstructionFromInstructionFile(S3Object instructionFile,
EncryptionMaterialsProvider materialsProvider,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static EncryptionInstruction |
buildInstructionFromObjectMetadata(S3Object object,
EncryptionMaterials materials,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static EncryptionInstruction |
buildInstructionFromObjectMetadata(S3Object object,
EncryptionMaterialsProvider materialsProvider,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static long |
calculateCryptoContentLength(Cipher symmetricCipher,
UploadPartRequest request)
Deprecated.
no longer used and will be removed in the future
|
static DeleteObjectRequest |
createInstructionDeleteObjectRequest(DeleteObjectRequest request)
Deprecated.
no longer used and will be removed in the future
|
static GetObjectRequest |
createInstructionGetRequest(S3ObjectId id)
Deprecated.
no longer used and will be removed in the future
|
static GetObjectRequest |
createInstructionGetRequest(S3ObjectId s3objectId,
String instFileSuffix)
Deprecated.
no longer used and will be removed in the future
|
static PutObjectRequest |
createInstructionPutRequest(PutObjectRequest request,
EncryptionInstruction instruction)
Deprecated.
no longer used and will be removed in the future
|
static PutObjectRequest |
createInstructionPutRequest(String bucketName,
String key,
EncryptionInstruction instruction)
Deprecated.
no longer used and will be removed in the future
|
static Cipher |
createSymmetricCipher(SecretKey symmetricCryptoKey,
int encryptMode,
Provider cryptoProvider,
byte[] initVector)
Deprecated.
no longer used and will be removed in the future
|
static S3Object |
decryptObjectUsingInstruction(S3Object object,
EncryptionInstruction instruction)
Deprecated.
no longer used and will be removed in the future
|
static S3Object |
decryptObjectUsingMetadata(S3Object object,
EncryptionMaterials materials,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static PutObjectRequest |
encryptRequestUsingInstruction(PutObjectRequest request,
EncryptionInstruction instruction)
Deprecated.
no longer used and will be removed in the future
|
static PutObjectRequest |
encryptRequestUsingMetadata(PutObjectRequest request,
EncryptionMaterials materials,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static EncryptionInstruction |
generateInstruction(EncryptionMaterials materials,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static EncryptionInstruction |
generateInstruction(EncryptionMaterialsProvider materialsProvider,
Map<String,String> materialsDescription,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static EncryptionInstruction |
generateInstruction(EncryptionMaterialsProvider materialsProvider,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static SecretKey |
generateOneTimeUseSymmetricKey()
Generates a one-time use Symmetric Key on-the-fly for use in envelope encryption.
|
static long[] |
getAdjustedCryptoRange(long[] range)
Deprecated.
no longer used and will be removed in the future
|
static ByteRangeCapturingInputStream |
getEncryptedInputStream(UploadPartRequest request,
CipherFactory cipherFactory)
Deprecated.
no longer used and will be removed in the future
|
static byte[] |
getEncryptedSymmetricKey(SecretKey toBeEncrypted,
EncryptionMaterials materials,
Provider cryptoProvider)
Deprecated.
no longer used and will be removed in the future
|
static boolean |
isEncryptionInfoInInstructionFile(S3Object instructionFile)
Deprecated.
no longer used and will be removed in the future
|
static boolean |
isEncryptionInfoInMetadata(S3Object retrievedObject)
Deprecated.
no longer used and will be removed in the future
|
static ObjectMetadata |
updateMetadataWithEncryptionInfo(InitiateMultipartUploadRequest request,
byte[] keyBytesToStoreInMetadata,
Cipher symmetricCipher,
Map<String,String> materialsDescription)
Deprecated.
no longer used and will be removed in the future
|
static void |
updateMetadataWithEncryptionInstruction(PutObjectRequest request,
EncryptionInstruction instruction)
Deprecated.
no longer used and will be removed in the future
|
@Deprecated public static PutObjectRequest encryptRequestUsingMetadata(PutObjectRequest request, EncryptionMaterials materials, Provider cryptoProvider)
request
- The request whose contents are to be encrypted.materials
- The encryption materials to be used to encrypt and decrypt data.cryptoProvider
- The crypto provider whose encryption implementation will be used to encrypt data@Deprecated public static S3Object decryptObjectUsingMetadata(S3Object object, EncryptionMaterials materials, Provider cryptoProvider)
object
- The object whose contents are to be decrypted.materials
- The encryption materials to be used to encrypt and decrypt data.cryptoProvider
- The crypto provider whose encryption implementation will be used to decrypt data@Deprecated public static EncryptionInstruction generateInstruction(EncryptionMaterials materials, Provider cryptoProvider)
materials
- The encryption materials to be used to encrypt and decrypt data.cryptoProvider
- The crypto provider whose encryption implementation will be used to encrypt and decrypt data.@Deprecated public static EncryptionInstruction generateInstruction(EncryptionMaterialsProvider materialsProvider, Provider cryptoProvider)
@Deprecated public static EncryptionInstruction generateInstruction(EncryptionMaterialsProvider materialsProvider, Map<String,String> materialsDescription, Provider cryptoProvider)
@Deprecated public static EncryptionInstruction buildInstruction(EncryptionMaterials materials, Provider cryptoProvider)
@Deprecated public static EncryptionInstruction buildInstructionFromInstructionFile(S3Object instructionFile, EncryptionMaterials materials, Provider cryptoProvider)
instructionFile
- A non-null instruction file retrieved from S3 that contains encryption informationmaterials
- The non-null encryption materials to be used to encrypt and decrypt data.cryptoProvider
- The crypto provider whose encryption implementation will be used to encrypt and decrypt data. Null is ok and uses the
preferred provider from Security.getProviders().@Deprecated public static EncryptionInstruction buildInstructionFromInstructionFile(S3Object instructionFile, EncryptionMaterialsProvider materialsProvider, Provider cryptoProvider)
instructionFile
- A non-null instruction file retrieved from S3 that contains encryption informationmaterialsProvider
- The non-null encryption materials provider to be used to encrypt and decrypt data.cryptoProvider
- The crypto provider whose encryption implementation will be used to encrypt and decrypt data. Null is ok and uses the
preferred provider from Security.getProviders().@Deprecated public static EncryptionInstruction buildInstructionFromObjectMetadata(S3Object object, EncryptionMaterials materials, Provider cryptoProvider)
object
- A non-null object that contains encryption information in its headersmaterials
- The non-null encryption materials to be used to encrypt and decrypt data.cryptoProvider
- The crypto provider whose encryption implementation will be used to encrypt and decrypt data. Null is ok and uses the
preferred provider from Security.getProviders().AmazonClientException
- if encryption information is missing in the metadata, or the encryption
materials used to encrypt the object are not available via the materials Accessor@Deprecated public static EncryptionInstruction buildInstructionFromObjectMetadata(S3Object object, EncryptionMaterialsProvider materialsProvider, Provider cryptoProvider)
object
- A non-null object that contains encryption information in its headersmaterialsProvider
- The non-null encryption materials provider to be used to encrypt and decrypt data.cryptoProvider
- The crypto provider whose encryption implementation will be used to encrypt and decrypt data. Null is ok and uses the
preferred provider from Security.getProviders().AmazonClientException
- if encryption information is missing in the metadata, or the encryption
materials used to encrypt the object are not available via the materials Accessor@Deprecated public static PutObjectRequest encryptRequestUsingInstruction(PutObjectRequest request, EncryptionInstruction instruction)
request
- The request whose contents are to be encrypted.instruction
- The instruction that will be used to encrypt the object data.@Deprecated public static S3Object decryptObjectUsingInstruction(S3Object object, EncryptionInstruction instruction)
object
- The object whose contents are to be decrypted.instruction
- The instruction that will be used to decrypt the object data.@Deprecated public static PutObjectRequest createInstructionPutRequest(PutObjectRequest request, EncryptionInstruction instruction)
request
- The put request for the original object to be stored in S3.instruction
- The instruction object to be stored in S3.@Deprecated public static PutObjectRequest createInstructionPutRequest(String bucketName, String key, EncryptionInstruction instruction)
@Deprecated public static GetObjectRequest createInstructionGetRequest(S3ObjectId id)
id
- an S3 object id (not the instruction file id)@Deprecated public static GetObjectRequest createInstructionGetRequest(S3ObjectId s3objectId, String instFileSuffix)
s3objectId
- an S3 object id (not the instruction file id)instFileSuffix
- suffix of the specific instruction file to be used, or null if
the default instruction file is to be used.@Deprecated public static DeleteObjectRequest createInstructionDeleteObjectRequest(DeleteObjectRequest request)
request
- The delete request for the original object to be deleted from S3.@Deprecated public static boolean isEncryptionInfoInMetadata(S3Object retrievedObject)
retrievedObject
- An S3Object@Deprecated public static boolean isEncryptionInfoInInstructionFile(S3Object instructionFile)
instructionFile
- An S3Object that may potentially be an instruction file@Deprecated public static long[] getAdjustedCryptoRange(long[] range)
range
- A two-element array of longs corresponding to the start and finish (inclusive) of a desired
range of bytes.@Deprecated public static S3Object adjustOutputToDesiredRange(S3Object object, long[] range)
object
- 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.public static SecretKey generateOneTimeUseSymmetricKey()
@Deprecated public static Cipher createSymmetricCipher(SecretKey symmetricCryptoKey, int encryptMode, Provider cryptoProvider, byte[] initVector)
@Deprecated public static byte[] getEncryptedSymmetricKey(SecretKey toBeEncrypted, EncryptionMaterials materials, Provider cryptoProvider)
@Deprecated public static ByteRangeCapturingInputStream getEncryptedInputStream(UploadPartRequest request, CipherFactory cipherFactory)
@Deprecated public static void updateMetadataWithEncryptionInstruction(PutObjectRequest request, EncryptionInstruction instruction)
request
- Non-null PUT request encrypted using the given instructioninstruction
- Non-null instruction used to encrypt the data in this PUT request.@Deprecated public static ObjectMetadata updateMetadataWithEncryptionInfo(InitiateMultipartUploadRequest request, byte[] keyBytesToStoreInMetadata, Cipher symmetricCipher, Map<String,String> materialsDescription)
@Deprecated public static long calculateCryptoContentLength(Cipher symmetricCipher, UploadPartRequest request)
Copyright © 2014. All rights reserved.