Class AwsCrypto.Builder

java.lang.Object
com.amazonaws.encryptionsdk.AwsCrypto.Builder
Enclosing class:
AwsCrypto

public static class AwsCrypto.Builder extends Object
  • Method Details

    • withEncryptionAlgorithm

      public AwsCrypto.Builder withEncryptionAlgorithm(CryptoAlgorithm encryptionAlgorithm)
      Sets the CryptoAlgorithm to encrypt with. The Aws Crypto client will use the last crypto algorithm set with either withEncryptionAlgorithm(CryptoAlgorithm) or AwsCrypto.setEncryptionAlgorithm(CryptoAlgorithm) to encrypt with.
      Parameters:
      encryptionAlgorithm - The CryptoAlgorithm
      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 either withEncryptionFrameSize(int) or AwsCrypto.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 the CommitmentPolicy 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()