Class EncryptionMaterials
- java.lang.Object
-
- software.amazon.encryption.s3.materials.EncryptionMaterials
-
- All Implemented Interfaces:
CryptographicMaterials
public final class EncryptionMaterials extends Object implements CryptographicMaterials
Contains the cryptographic materials needed for an encryption operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEncryptionMaterials.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgorithmSuitealgorithmSuite()static EncryptionMaterials.Builderbuilder()CipherModecipherMode()ProvidercryptoProvider()SecretKeydataKey()List<EncryptedDataKey>encryptedDataKeys()Note that the underlying implementation uses a Collections.unmodifiableList which is immutable.Map<String,String>encryptionContext()Note that the underlying implementation uses a Collections.unmodifiableMap which is immutable.CiphergetCipher(byte[] iv)longgetCiphertextLength()byte[]getKeyCommitment()longgetPlaintextLength()byte[]iv()MaterialsDescriptionmaterialsDescription()byte[]messageId()byte[]plaintextDataKey()software.amazon.awssdk.services.s3.model.S3Requests3Request()voidsetIvAndMessageId(byte[] iv, byte[] messageId)voidsetKeyCommitment(byte[] keyCommitment)EncryptionMaterials.BuildertoBuilder()
-
-
-
Method Detail
-
builder
public static EncryptionMaterials.Builder builder()
-
s3Request
public software.amazon.awssdk.services.s3.model.S3Request s3Request()
- Specified by:
s3Requestin interfaceCryptographicMaterials
-
algorithmSuite
public AlgorithmSuite algorithmSuite()
- Specified by:
algorithmSuitein interfaceCryptographicMaterials
-
encryptionContext
public Map<String,String> encryptionContext()
Note that the underlying implementation uses a Collections.unmodifiableMap which is immutable.- Specified by:
encryptionContextin interfaceCryptographicMaterials
-
encryptedDataKeys
public List<EncryptedDataKey> encryptedDataKeys()
Note that the underlying implementation uses a Collections.unmodifiableList which is immutable.
-
plaintextDataKey
public byte[] plaintextDataKey()
-
getPlaintextLength
public long getPlaintextLength()
-
getCiphertextLength
public long getCiphertextLength()
-
dataKey
public SecretKey dataKey()
- Specified by:
dataKeyin interfaceCryptographicMaterials
-
cryptoProvider
public Provider cryptoProvider()
- Specified by:
cryptoProviderin interfaceCryptographicMaterials
-
materialsDescription
public MaterialsDescription materialsDescription()
-
cipherMode
public CipherMode cipherMode()
- Specified by:
cipherModein interfaceCryptographicMaterials
-
getCipher
public Cipher getCipher(byte[] iv)
- Specified by:
getCipherin interfaceCryptographicMaterials
-
getKeyCommitment
public byte[] getKeyCommitment()
- Specified by:
getKeyCommitmentin interfaceCryptographicMaterials
-
setKeyCommitment
public void setKeyCommitment(byte[] keyCommitment)
-
messageId
public byte[] messageId()
- Specified by:
messageIdin interfaceCryptographicMaterials
-
iv
public byte[] iv()
- Specified by:
ivin interfaceCryptographicMaterials
-
setIvAndMessageId
public void setIvAndMessageId(byte[] iv, byte[] messageId)
-
toBuilder
public EncryptionMaterials.Builder toBuilder()
-
-