Package com.amazonaws.encryptionsdk
Class AwsCrypto.Builder
- java.lang.Object
-
- com.amazonaws.encryptionsdk.AwsCrypto.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AwsCrypto
build()
AwsCrypto.Builder
withCommitmentPolicy(CommitmentPolicy commitmentPolicy)
Sets theCommitmentPolicy
of this Aws Crypto client.AwsCrypto.Builder
withEncryptionAlgorithm(CryptoAlgorithm encryptionAlgorithm)
Sets theCryptoAlgorithm
to encrypt with.AwsCrypto.Builder
withEncryptionFrameSize(int frameSize)
Sets the frame size of the encrypted messages that the Aws Crypto client produces.AwsCrypto.Builder
withMaxEncryptedDataKeys(int maxEncryptedDataKeys)
Sets the maximum number of encrypted data keys that this Aws Crypto client will wrap when encrypting, or unwrap when decrypting, a single message.
-
-
-
Method Detail
-
withEncryptionAlgorithm
public AwsCrypto.Builder withEncryptionAlgorithm(CryptoAlgorithm encryptionAlgorithm)
Sets theCryptoAlgorithm
to encrypt with. The Aws Crypto client will use the last crypto algorithm set with eitherwithEncryptionAlgorithm(CryptoAlgorithm)
orAwsCrypto.setEncryptionAlgorithm(CryptoAlgorithm)
to encrypt with.- Parameters:
encryptionAlgorithm
- TheCryptoAlgorithm
- Returns:
- The Builder, for method chaining
-
withEncryptionFrameSize
public AwsCrypto.Builder withEncryptionFrameSize(int frameSize)
Sets the frame size of the encrypted messages that the Aws Crypto client produces. The Aws Crypto client will use the last frame size set with eitherwithEncryptionFrameSize(int)
orAwsCrypto.setEncryptionFrameSize(int)
.- Parameters:
frameSize
- The frame size to produce encrypted messages with.- Returns:
- The Builder, for method chaining
-
withCommitmentPolicy
public AwsCrypto.Builder withCommitmentPolicy(CommitmentPolicy commitmentPolicy)
Sets theCommitmentPolicy
of this Aws Crypto client.- Parameters:
commitmentPolicy
- The commitment policy to enforce during encryption and decryption- Returns:
- The Builder, for method chaining
-
withMaxEncryptedDataKeys
public AwsCrypto.Builder withMaxEncryptedDataKeys(int maxEncryptedDataKeys)
Sets the maximum number of encrypted data keys that this Aws Crypto client will wrap when encrypting, or unwrap when decrypting, a single message.- Parameters:
maxEncryptedDataKeys
- The maximum number of encrypted data keys; must be positive- Returns:
- The Builder, for method chaining
-
build
public AwsCrypto build()
-
-