PrivateKeyInfo Class
Namespace: Rebex.Security.Cryptography.Pkcs
Assembly: Rebex.Common.dll (version 7.0.9147)
Represents a private key.
Syntax
public class PrivateKeyInfo : PkcsBase
Inherited Members
Constructors
Name | Description |
---|---|
Private |
Creates a new instance of Private |
Private |
Creates a new instance of Private |
Private |
Creates a new instance of Private |
Private |
Creates a new instance of Private |
Properties
Name | Description |
---|---|
Comment | Gets or ets the key comment. The comment is used while saving in some formats. |
Key |
Gets the key algorithm identifier. |
Methods
Name | Description |
---|---|
Encode() | Gets ASN.1 encoded form of this Private |
Generate(Key |
Generates a private key using the specified algorithm and default key size. |
Generate(Key |
Generates a private key using the specified algorithm and key size. |
Get |
Gets the DSA parameters for a DSA key. May only be used for DSA private keys. |
Get |
Gets a public key corresponding to the private key. |
Get |
Gets the RSA parameters for a RSA key. May only be used for RSA private keys. |
Load(Stream, Byte[]) | Loads a PKCS #8, PuTTY or SSLeay (OpenSSL/OpenSSH) format private key from a stream.
Upon successful decoding, information can be retrieved using Private |
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 Private |
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 Private |
Load |
Loads a CMS/PKCS #7 signed or enveloped message from a stream.
Returns an instance of Signed |
Save(Stream, Byte[], Private |
Saves the private key into the supplied stream in the specified format. |
Save(Stream, String, Object |
Saves the private key into the supplied stream in Base64-encoded PKCS #8 format. |
Save(Stream, String, Private |
Saves the private key into the supplied stream in the specified format. |
Save(String, String, Private |
Saves the private key into the supplied stream in the specified format. |
To |
Gets the raw form of the private key. |