語言

Pkcs8PrivateKeyInfo 類別

定義

允許檢查及建立 PKCS#8 PrivateKeyInfo 與 EncryptedPrivateKeyInfo 值。 此類別無法獲得繼承。

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

建構函式

名稱 Description
Pkcs8PrivateKeyInfo(Oid, Nullable<ReadOnlyMemory<Byte>>, ReadOnlyMemory<Byte>, Boolean)

初始化 Pkcs8PrivateKeyInfo 類別的新執行個體。

屬性

名稱 Description
AlgorithmId

取得物件識別碼(OID)值,識別此鍵所屬演算法。

AlgorithmParameters

取得包含與此鍵相關聯的 BER 編碼演算法參數的記憶體值。

Attributes

取得此私鑰可修改的屬性集合。

PrivateKeyBytes

會獲得一個記憶體值,代表演算法專屬的編碼私鑰。

方法

名稱 Description
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,並以指定的字元密碼與加密參數加密,並將結果寫入提供的緩衝區。

適用於