public class PrivateKeyInfoFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static PrivateKeyInfo |
createPrivateKeyInfo(AsymmetricKeyParameter privateKey)
Create a PrivateKeyInfo representation of a private key.
|
static PrivateKeyInfo |
createPrivateKeyInfo(AsymmetricKeyParameter privateKey,
ASN1Set attributes)
Create a PrivateKeyInfo representation of a private key with attributes.
|
public static PrivateKeyInfo createPrivateKeyInfo(AsymmetricKeyParameter privateKey) throws java.io.IOException
privateKey
- the key to be encoded into the info object.java.io.IOException
- on an error encoding the keypublic static PrivateKeyInfo createPrivateKeyInfo(AsymmetricKeyParameter privateKey, ASN1Set attributes) throws java.io.IOException
privateKey
- the key to be encoded into the info object.attributes
- the set of attributes to be included.java.io.IOException
- on an error encoding the key