Class PqcPrivateKeyInfoFactory
- Namespace
- Org.BouncyCastle.Pqc.Crypto.Utilities
- Assembly
- BouncyCastle.Cryptography.dll
public static class PqcPrivateKeyInfoFactory
- Inheritance
-
PqcPrivateKeyInfoFactory
- Inherited Members
Methods
CreatePrivateKeyInfo(AsymmetricKeyParameter)
Create a PrivateKeyInfo representation of a private key.
public static PrivateKeyInfo CreatePrivateKeyInfo(AsymmetricKeyParameter privateKey)
Parameters
privateKeyAsymmetricKeyParameterthe key to be encoded into the info object.
Returns
- PrivateKeyInfo
the appropriate PrivateKeyInfo
Exceptions
- ArgumentException
on an error encoding the key
CreatePrivateKeyInfo(AsymmetricKeyParameter, Asn1Set)
Create a PrivateKeyInfo representation of a private key with attributes.
public static PrivateKeyInfo CreatePrivateKeyInfo(AsymmetricKeyParameter privateKey, Asn1Set attributes)
Parameters
privateKeyAsymmetricKeyParameterthe key to be encoded into the info object.
attributesAsn1Setthe set of attributes to be included.
Returns
- PrivateKeyInfo
the appropriate PrivateKeyInfo
Exceptions
- ArgumentException
on an error encoding the key