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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompressionAlgorithm
negotiateCompressionAlgorithm(ProducerOptions producerOptions)
static SymmetricKeyAlgorithm
negotiateSymmetricEncryptionAlgorithm(EncryptionOptions encryptionOptions)
Negotiate theSymmetricKeyAlgorithm
used for message encryption.EncryptionBuilderInterface.WithOptions
onOutputStream(OutputStream outputStream)
Create aEncryptionStream
on anOutputStream
that contains the plain data that shall be encrypted and or signed.
-
-
-
Constructor Detail
-
EncryptionBuilder
public EncryptionBuilder()
-
-
Method Detail
-
onOutputStream
public EncryptionBuilderInterface.WithOptions onOutputStream(@Nonnull OutputStream outputStream)
Description copied from interface:EncryptionBuilderInterface
Create aEncryptionStream
on anOutputStream
that contains the plain data that shall be encrypted and or signed.- Specified by:
onOutputStream
in interfaceEncryptionBuilderInterface
- Parameters:
outputStream
- output stream of the plain data.- Returns:
- api handle
-
negotiateSymmetricEncryptionAlgorithm
public static SymmetricKeyAlgorithm negotiateSymmetricEncryptionAlgorithm(EncryptionOptions encryptionOptions)
Negotiate theSymmetricKeyAlgorithm
used for message encryption.- Parameters:
encryptionOptions
- encryption options- Returns:
- negotiated symmetric key algorithm
-
negotiateCompressionAlgorithm
public static CompressionAlgorithm negotiateCompressionAlgorithm(ProducerOptions producerOptions)
-
-