src/main/java/com/amazonaws/encryptionsdk/AwsCrypto.java [333:354]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      final int plaintextSize,
      final Map<String, String> encryptionContext) {
    EncryptionMaterialsRequest request =
        EncryptionMaterialsRequest.newBuilder()
            .setContext(encryptionContext)
            .setRequestedAlgorithm(getEncryptionAlgorithm())
            // We're not actually encrypting any data, so don't consume any bytes from the cache's
            // limits. We do need to
            // pass /something/ though, or the cache will be bypassed (as it'll assume this is a
            // streaming encrypt of
            // unknown size).
            .setPlaintextSize(0)
            .setCommitmentPolicy(commitmentPolicy_)
            .build();

    final MessageCryptoHandler cryptoHandler =
        new EncryptionHandler(
            getEncryptionFrameSize(),
            checkAlgorithm(new CMMHandler(materialsManager).getMaterialsForEncrypt(request)),
            commitmentPolicy_);

    return cryptoHandler.estimateOutputSize(plaintextSize);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/com/amazonaws/encryptionsdk/AwsCrypto.java [363:384]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      final int plaintextSize,
      final Map<String, String> encryptionContext) {
    EncryptionMaterialsRequest request =
        EncryptionMaterialsRequest.newBuilder()
            .setContext(encryptionContext)
            .setRequestedAlgorithm(getEncryptionAlgorithm())
            // We're not actually encrypting any data, so don't consume any bytes from the cache's
            // limits. We do need to
            // pass /something/ though, or the cache will be bypassed (as it'll assume this is a
            // streaming encrypt of
            // unknown size).
            .setPlaintextSize(0)
            .setCommitmentPolicy(commitmentPolicy_)
            .build();

    final MessageCryptoHandler cryptoHandler =
        new EncryptionHandler(
            getEncryptionFrameSize(),
            checkAlgorithm(new CMMHandler(materialsManager).getMaterialsForEncrypt(request)),
            commitmentPolicy_);

    return cryptoHandler.estimateOutputSize(plaintextSize);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



