The PrivateKeyInfo type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PrivateKeyInfo()()()() |
Creates a new instance of PrivateKeyInfo. Use the Load(Stream, String) method to load a private key.
| |
PrivateKeyInfo(DSAParameters) |
Creates a new instance of PrivateKeyInfo based on the specified DSA parameters.
| |
PrivateKeyInfo(RSAParameters) |
Creates a new instance of PrivateKeyInfo based on the specified RSA parameters.
|
Methods
Name | Description | |
---|---|---|
Encode |
Gets ASN.1 encoded form of this PrivateKeyInfo object.
| |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
Generate(KeyAlgorithm) |
Generates a private key using the specified algorithm and default key size.
| |
Generate(KeyAlgorithm, Int32) |
Generates a private key using the specified algorithm and key size.
| |
GetDSAParameters |
Gets the DSA parameters for a DSA key. May only be used for DSA private keys.
| |
GetHashCode | Serves as a hash function for a particular type. GetHashCode()()()() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) | |
GetPrivateKey | Obsolete. | |
GetPublicKey |
Gets a public key corresponding to the private key.
| |
GetRSAParameters |
Gets the RSA parameters for a RSA key. May only be used for RSA private keys.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Load(Stream, String) |
Loads a PKCS #8, PuTTY or SSLeay (OpenSSL/OpenSSH) format private key from a stream.
Upon successful decoding, information can be retrieved using PrivateKeyInfo
methods and properties.
| |
Load(String, String) |
Loads a PKCS #8, PuTTY or SSLeay (OpenSSL/OpenSSH) format private key from a stream.
Upon successful decoding, information can be retrieved using PrivateKeyInfo
methods and properties.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Save(Stream, String, ObjectIdentifier) |
Saves the private key into the supplied stream in Base64-encoded PKCS #8 format.
| |
Save(Stream, String, PrivateKeyFormat) |
Saves the private key into the supplied stream in the specified format.
| |
Save(String, String, PrivateKeyFormat) |
Saves the private key into the supplied stream in the specified format.
| |
ToBytes |
Gets the raw form of the private key.
| |
ToString | Returns a String that represents the current Object. (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
Comment |
Gets or ets the key comment. The comment is used while saving in some formats.
| |
KeyAlgorithm |
Gets the key algorithm identifier.
|