blob: bff681ab13aaa8ef578bc3a1e0481f4e5769c9fc (
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.jcajce;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import org.bouncycastle.openpgp.PGPObjectFactory;
import org.bouncycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator;
/**
* {@link PGPObjectFactory} that uses the sources cryptographic primitives from the JCA API.
*/
public class JcaPGPObjectFactory
extends PGPObjectFactory
{
/**
* Construct an object factory to read PGP objects from encoded data.
*
* @param encoded the PGP encoded data.
*/
public JcaPGPObjectFactory(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 JcaPGPObjectFactory(InputStream in)
{
// FIXME: Convert this to builder style so we can set provider?
super(in, new JcaKeyFingerprintCalculator());
}
}
|