blob: 7ee93c73094b8f466e7106bab0f4306b0bebac44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
package org.bouncycastle.openpgp.bc;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import org.bouncycastle.openpgp.PGPObjectFactory;
import org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator;
/**
* {@link PGPObjectFactory} that uses the Bouncy Castle lightweight API to implement cryptographic
* primitives.
*/
public class BcPGPObjectFactory
extends PGPObjectFactory
{
/**
* Construct an object factory to read PGP objects from encoded data.
*
* @param encoded the PGP encoded data.
*/
public BcPGPObjectFactory(byte[] encoded)
{
this(new ByteArrayInputStream(encoded));
}
/**
* Construct an object factory to read PGP objects from a stream.
*
* @param in the stream containing PGP encoded objects.
*/
public BcPGPObjectFactory(InputStream in)
{
super(in, new BcKeyFingerprintCalculator());
}
}
|