Top Description Methods
org.bouncycastle.openpgp.operator

public Interface PGPDataEncryptor

Known Direct Subinterfaces
org.bouncycastle.openpgp.operator.PGPAEADDataEncryptor
Known Direct Implementers
org.bouncycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder.MyPGPDataEncryptor
Imports
java.io.OutputStream

A data encryptor, combining a cipher instance and an optional integrity check calculator.

PGPDataEncryptor instances are generally not constructed directly, but obtained from a PGPDataEncryptorBuilder.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the block size in bytes.
getBlockSize
()

Gets the block size of the underlying cipher used by this encryptor.

public PGPDigestCalculator

Returns:

the integrity check calculator, or null if no integrity checking was configured.
getIntegrityCalculator
()

Obtains the integrity check calculator configured for this encryptor instance.

public OutputStream

Returns:

a cipher output stream appropriate to the type of this data encryptor.
getOutputStream
(OutputStream
the stream to wrap and write encrypted data to.
out
)

Constructs an encrypting output stream that encrypts data using the underlying cipher of this encryptor.

Method Detail

getBlockSizeback to summary
public int getBlockSize()

Gets the block size of the underlying cipher used by this encryptor.

Returns:int

the block size in bytes.

getIntegrityCalculatorback to summary
public PGPDigestCalculator getIntegrityCalculator()

Obtains the integrity check calculator configured for this encryptor instance.

Returns:PGPDigestCalculator

the integrity check calculator, or null if no integrity checking was configured.

getOutputStreamback to summary
public OutputStream getOutputStream(OutputStream out)

Constructs an encrypting output stream that encrypts data using the underlying cipher of this encryptor.

The cipher instance in this encryptor is used for all output streams obtained from this method, so it should only be invoked once.

Parameters
out:OutputStream

the stream to wrap and write encrypted data to.

Returns:OutputStream

a cipher output stream appropriate to the type of this data encryptor.