语言

Pkcs8PrivateKeyInfo 类

定义

启用对 PKCS#8 PrivateKeyInfo 和 EncryptedPrivateKeyInfo 值的检查和创建。 此类不能被继承。

public ref class Pkcs8PrivateKeyInfo sealed
public sealed class Pkcs8PrivateKeyInfo
type Pkcs8PrivateKeyInfo = class
Public NotInheritable Class Pkcs8PrivateKeyInfo
继承
Pkcs8PrivateKeyInfo

构造函数

名称 说明
Pkcs8PrivateKeyInfo(Oid, Nullable<ReadOnlyMemory<Byte>>, ReadOnlyMemory<Byte>, Boolean)

初始化 Pkcs8PrivateKeyInfo 类的新实例。

属性

名称 说明
AlgorithmId

获取标识此密钥所针对的算法的对象标识符 (OID) 值。

AlgorithmParameters

获取包含与此键关联的 BER 编码算法参数的内存值。

Attributes

获取此私钥的属性的可修改集合。

PrivateKeyBytes

获取表示特定于算法的编码私钥的内存值。

方法

名称 说明
Create(AsymmetricAlgorithm)

将指定的密钥导出为 PKCS#8 PrivateKeyInfo 并返回其解码的解释。

Decode(ReadOnlyMemory<Byte>, Int32, Boolean)

以 PKCS#8 PrivateKeyInfo 的形式读取所提供的数据,并返回内容的对象视图。

DecryptAndDecode(ReadOnlySpan<Byte>, ReadOnlyMemory<Byte>, Int32)

使用提供的基于字节的密码解密所提供的数据,并将输出解码为 PKCS#8 PrivateKeyInfo 的对象视图。

DecryptAndDecode(ReadOnlySpan<Char>, ReadOnlyMemory<Byte>, Int32)

使用提供的基于字符的密码解密所提供的数据,并将输出解码为 PKCS#8 PrivateKeyInfo 的对象视图。

Encode()

将此实例的属性数据编码为 PKCS#8 PrivateKeyInfo,并将编码作为字节数组返回。

Encrypt(ReadOnlySpan<Byte>, PbeParameters)

使用指定的基于字节的密码和加密参数进行加密后,从此对象的属性内容生成 PKCS#8 EncryptedPrivateKeyInfo。

Encrypt(ReadOnlySpan<Char>, PbeParameters)

使用指定的基于字符的密码和加密参数进行加密后,从此对象的属性内容生成 PKCS#8 EncryptedPrivateKeyInfo。

TryEncode(Span<Byte>, Int32)

尝试将此实例的属性数据编码为 PKCS#8 PrivateKeyInfo,并将结果写入提供的缓冲区。

TryEncrypt(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

使用基于字节的密码和加密参数进行加密后,尝试从此对象的属性内容生成 PKCS#8 EncryptedPrivateKeyInfo,并将结果写入提供的缓冲区。

TryEncrypt(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)

尝试使用指定的基于字符的密码和加密参数进行加密后,从此对象的属性内容生成 PKCS#8 EncryptedPrivateKeyInfo,并将结果写入提供的缓冲区。

适用于