Class PqcPrivateKeyFactory
- Namespace
- Org.BouncyCastle.Pqc.Crypto.Utilities
- Assembly
- BouncyCastle.Cryptography.dll
public static class PqcPrivateKeyFactory
- Inheritance
-
PqcPrivateKeyFactory
- Inherited Members
Methods
CreateKey(PrivateKeyInfo)
Create a private key parameter from the passed in PKCS8 PrivateKeyInfo object.
public static AsymmetricKeyParameter CreateKey(PrivateKeyInfo keyInfo)
Parameters
keyInfoPrivateKeyInfothe PrivateKeyInfo object containing the key material
Returns
- AsymmetricKeyParameter
a suitable private key parameter
Exceptions
- IOException
on an error decoding the key
CreateKey(byte[])
Create a private key parameter from a PKCS8 PrivateKeyInfo encoding.
public static AsymmetricKeyParameter CreateKey(byte[] privateKeyInfoData)
Parameters
privateKeyInfoDatabyte[]the PrivateKeyInfo encoding
Returns
- AsymmetricKeyParameter
a suitable private key parameter
Exceptions
- IOException
on an error decoding the key
CreateKey(Stream)
Create a private key parameter from a PKCS8 PrivateKeyInfo encoding read from a stream
public static AsymmetricKeyParameter CreateKey(Stream inStr)
Parameters
inStrStreamthe stream to read the PrivateKeyInfo encoding from
Returns
- AsymmetricKeyParameter
a suitable private key parameter
Exceptions
- IOException
on an error decoding the key