| java.lang.Object org.bouncycastle.openpgp.PGPEncryptedDataGenerator
Method Summary | |
public void | addMethod(char[] passPhrase) Add a PBE encryption method to the encrypted object. | public void | addMethod(PGPPublicKey key) Add a public key encrypted session key to the encrypted object. | public void | close() Close off the encrypted object - this is equivalent to calling close on the stream
returned by the open() method. | public OutputStream | open(OutputStream out, long length) Return an outputstream which will encrypt the data as it is written
to it. | public OutputStream | open(OutputStream out, byte[] buffer) Return an outputstream which will encrypt the data as it is written
to it. |
PGPEncryptedDataGenerator | public PGPEncryptedDataGenerator(int encAlgorithm, SecureRandom rand, String provider)(Code) | | Base constructor.
Parameters: encAlgorithm - the symmetric algorithm to use. Parameters: rand - source of randomness Parameters: provider - the provider to use for encryption algorithms. |
PGPEncryptedDataGenerator | public PGPEncryptedDataGenerator(int encAlgorithm, boolean withIntegrityPacket, SecureRandom rand, String provider)(Code) | | Creates a cipher stream which will have an integrity packet
associated with it.
Parameters: encAlgorithm - Parameters: withIntegrityPacket - Parameters: rand - Parameters: provider - |
PGPEncryptedDataGenerator | public PGPEncryptedDataGenerator(int encAlgorithm, SecureRandom rand, boolean oldFormat, String provider)(Code) | | Base constructor.
Parameters: encAlgorithm - the symmetric algorithm to use. Parameters: rand - source of randomness Parameters: oldFormat - PGP 2.6.x compatability required. Parameters: provider - the provider to use for encryption algorithms. |
close | public void close() throws IOException(Code) | | Close off the encrypted object - this is equivalent to calling close on the stream
returned by the open() method.
throws: IOException - |
open | public OutputStream open(OutputStream out, byte[] buffer) throws IOException, PGPException(Code) | | Return an outputstream which will encrypt the data as it is written
to it. The stream will be written out in chunks according to the size of the
passed in buffer. The stream can be closed off by either calling close()
on the stream or close() on the generator.
Note: if the buffer is not a power of 2 in length only the largest power of 2
bytes worth of the buffer will be used.
Parameters: out - Parameters: buffer - the buffer to use. OutputStream throws: IOException - throws: PGPException - |
|
|