Class PrivateKey
Assembly: Lacuna.Pki.dll
Syntax
public abstract class PrivateKey : IPrivateKey
Properties
Algorithm
Declaration
public abstract PKAlgorithm Algorithm { get; }
Property Value
Methods
Decode(Byte[])
Decodes private key from ASN1 DER content or PEM file content
Declaration
public static PrivateKey Decode(byte[] content)
Parameters
Type |
Name |
Description |
Byte[] |
content |
|
Returns
Decode(Byte[], String)
Decodes encrypted private key from ASN1 DER content or PEM file content
Declaration
public static PrivateKey Decode(byte[] content, string password)
Parameters
Type |
Name |
Description |
Byte[] |
content |
|
String |
password |
|
Returns
Decode(String)
Decodes private key from PEM string or ASN1 DER base64 string
Declaration
public static PrivateKey Decode(string pem)
Parameters
Type |
Name |
Description |
String |
pem |
|
Returns
Decode(String, String)
Decodes encrypted private key from PEM string or ASN1 DER base64 string
Declaration
public static PrivateKey Decode(string pem, string password)
Parameters
Returns
Export()
Returns the DER-encoded (unencrypted) private key (PKCS #8)
Declaration
Returns
ExportPem()
Returns the PEM-encoded (unencrypted) private key (PKCS #8)
Declaration
public string ExportPem()
Returns
GetEncryptionCsp()
Declaration
public abstract IEncryptionCsp GetEncryptionCsp()
Returns
Implements
GetInstance(AsymmetricAlgorithm)
Declaration
public static PrivateKey GetInstance(AsymmetricAlgorithm underlyingPrivateKey)
Parameters
Returns
GetInstance(X509Certificate2)
Declaration
public static IPrivateKey GetInstance(X509Certificate2 x509Certificate)
Parameters
Returns
GetSignatureCsp(DigestAlgorithm)
Declaration
public abstract ISignatureCsp GetSignatureCsp(DigestAlgorithm digestAlgorithm)
Parameters
Returns
Implements