Package org.pgpainless.encryption_signing

# Class EncryptionBuilder

java.lang.Object
org.pgpainless.encryption_signing.EncryptionBuilder

All Implemented Interfaces:
  `EncryptionBuilderInterface`

public class EncryptionBuilder extends Object implements EncryptionBuilderInterface

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.pgpainless.encryption_signing.EncryptionBuilderInterface

`EncryptionBuilderInterface.WithOptions`

## Constructor Summary

Constructors
Constructor
Description
`EncryptionBuilder()`

## Method Summary

Modifier and Type
Method
Description
`static CompressionAlgorithm`
`negotiateCompressionAlgorithm(ProducerOptions producerOptions)`
`static SymmetricKeyAlgorithm`
`negotiateSymmetricEncryptionAlgorithm(EncryptionOptions encryptionOptions)`
Negotiate the `SymmetricKeyAlgorithm` used for message encryption.
`EncryptionBuilderInterface.WithOptions`
`onOutputStream(OutputStream outputStream)`
Create a `EncryptionStream` on an `OutputStream` that contains the plain data that shall be encrypted and or signed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### EncryptionBuilder

public EncryptionBuilder()

## Method Details

### onOutputStream

public EncryptionBuilderInterface.WithOptions onOutputStream(@Nonnull OutputStream outputStream)
Description copied from interface: `EncryptionBuilderInterface`
Create a `EncryptionStream` on an `OutputStream` that contains the plain data that shall be encrypted and or signed.

Specified by:
  `onOutputStream` in interface `EncryptionBuilderInterface`
Parameters:
  `outputStream` - output stream of the plain data.
Returns:
  api handle

### negotiateSymmetricEncryptionAlgorithm

public static SymmetricKeyAlgorithm negotiateSymmetricEncryptionAlgorithm(EncryptionOptions encryptionOptions)
Negotiate the `SymmetricKeyAlgorithm` used for message encryption.

Parameters:
  `encryptionOptions` - encryption options
Returns:
  negotiated symmetric key algorithm

### negotiateCompressionAlgorithm

public static CompressionAlgorithm negotiateCompressionAlgorithm(ProducerOptions producerOptions)