PrivateKey
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class
public abstract class PrivateKey : IPrivateKey
Hierarquia: object → PrivateKey
Construtores
PrivateKey()
protected PrivateKey()
Propriedades
Algorithm
public abstract PKAlgorithm Algorithm { get; }
Retorno
Métodos
Decode(byte[], string)
Decodes encrypted private key from ASN1 DER content or PEM file content
public static PrivateKey Decode(byte[] content, string password)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
content | byte[] | |
password | string |
Retorno
Decode(byte[])
Decodes private key from ASN1 DER content or PEM file content
public static PrivateKey Decode(byte[] content)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
content | byte[] |
Retorno
Decode(string, string)
Decodes encrypted private key from PEM string or ASN1 DER base64 string
public static PrivateKey Decode(string pem, string password)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
pem | string | |
password | string |
Retorno
Decode(string)
Decodes private key from PEM string or ASN1 DER base64 string
public static PrivateKey Decode(string pem)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
pem | string |
Retorno
Export()
Returns the DER-encoded (unencrypted) private key (PKCS #8)
public byte[] Export()
Retorno
Comentários
Not all private keys are exportable. For such keys, an exception will be thrown.
ExportPem()
Returns the PEM-encoded (unencrypted) private key (PKCS #8)
public string ExportPem()
Retorno
Comentários
Not all private keys are exportable. For such keys, an exception will be thrown.
GetEncryptionCsp()
public abstract IEncryptionCsp GetEncryptionCsp()
Retorno
GetInstance(AsymmetricAlgorithm)
public static PrivateKey GetInstance(AsymmetricAlgorithm underlyingPrivateKey)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
underlyingPrivateKey | AsymmetricAlgorithm |
Retorno
GetInstance(X509Certificate2)
public static IPrivateKey GetInstance(X509Certificate2 x509Certificate)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
x509Certificate | X509Certificate2 |
Retorno
GetSignatureCsp(DigestAlgorithm)
public abstract ISignatureCsp GetSignatureCsp(DigestAlgorithm digestAlgorithm)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
digestAlgorithm | DigestAlgorithm |
Retorno
Membros herdados
ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()