org.bouncycastle.crypto.util
Class PrivateKeyFactory
java.lang.Object
org.bouncycastle.crypto.util.PrivateKeyFactory
public class PrivateKeyFactory
extends java.lang.Object
Factory for creating private key objects from PKCS8 PrivateKeyInfo objects.
createKey
public static AsymmetricKeyParameter createKey(InputStream inStr)
throws IOException
Create a private key parameter from a PKCS8 PrivateKeyInfo encoding read from a stream.
inStr
- the stream to read the PrivateKeyInfo encoding from
- a suitable private key parameter
createKey
public static AsymmetricKeyParameter createKey(byte[] privateKeyInfoData)
throws IOException
Create a private key parameter from a PKCS8 PrivateKeyInfo encoding.
privateKeyInfoData
- the PrivateKeyInfo encoding
- a suitable private key parameter
createKey
public static AsymmetricKeyParameter createKey(PrivateKeyInfo keyInfo)
throws IOException
Create a private key parameter from the passed in PKCS8 PrivateKeyInfo object.
keyInfo
- the PrivateKeyInfo object containing the key material
- a suitable private key parameter