Package com.amazonaws.encryptionsdk
Class AwsCrypto.Builder
java.lang.Object
com.amazonaws.encryptionsdk.AwsCrypto.Builder
- Enclosing class:
- AwsCrypto
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
withCommitmentPolicy(CommitmentPolicy commitmentPolicy)
Sets theCommitmentPolicy
of this Aws Crypto client.withEncryptionAlgorithm(CryptoAlgorithm encryptionAlgorithm)
Sets theCryptoAlgorithm
to encrypt with.withEncryptionFrameSize(int frameSize)
Sets the frame size of the encrypted messages that the Aws Crypto client produces.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 Details
-
withEncryptionAlgorithm
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
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
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
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
-