RSAOpenSsl 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
RSAOpenSsl() |
使用隨機 2048 位元金鑰組,以初始化 RSAOpenSsl 類別的新執行個體。 |
RSAOpenSsl(Int32) |
使用指定大小之隨機產生的金鑰,初始化 RSAOpenSsl 類別的新執行個體。 |
RSAOpenSsl(IntPtr) |
從以 表示 |
RSAOpenSsl(RSAParameters) |
使用指定的金鑰參數,以初始化 RSAOpenSsl 類別的新執行個體。 |
RSAOpenSsl(SafeEvpPKeyHandle) |
從以 表示 |
RSAOpenSsl()
使用隨機 2048 位元金鑰組,以初始化 RSAOpenSsl 類別的新執行個體。
public:
RSAOpenSsl();
public RSAOpenSsl ();
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public RSAOpenSsl ();
Public Sub New ()
- 屬性
備註
此建構函式不會立即產生新的公開/私鑰組。 此建構函式會將 KeySize 屬性設定為 2048,而且當需要使用 屬性值產生索引鍵時。 如果密鑰是透過 ImportParameters 方法或其他金鑰匯入方法載入,則此建構函式中的金鑰大小沒有任何意義。
適用於
RSAOpenSsl(Int32)
使用指定大小之隨機產生的金鑰,初始化 RSAOpenSsl 類別的新執行個體。
public:
RSAOpenSsl(int keySize);
public RSAOpenSsl (int keySize);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public RSAOpenSsl (int keySize);
new System.Security.Cryptography.RSAOpenSsl : int -> System.Security.Cryptography.RSAOpenSsl
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.RSAOpenSsl : int -> System.Security.Cryptography.RSAOpenSsl
Public Sub New (keySize As Integer)
參數
- keySize
- Int32
要產生的金鑰大小 (以位元為單位)。
- 屬性
例外狀況
keySize
無效。
適用於
RSAOpenSsl(IntPtr)
從以 表示RSA*
的現有 OpenSSL 索引鍵,初始化 類別的新實例RSAOpenSsl。
public:
RSAOpenSsl(IntPtr handle);
public RSAOpenSsl (IntPtr handle);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public RSAOpenSsl (IntPtr handle);
new System.Security.Cryptography.RSAOpenSsl : nativeint -> System.Security.Cryptography.RSAOpenSsl
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.RSAOpenSsl : nativeint -> System.Security.Cryptography.RSAOpenSsl
Public Sub New (handle As IntPtr)
參數
- handle
-
IntPtr
nativeint
要當做索引鍵使用的 OpenSSL RSA*
值。
- 屬性
例外狀況
handle
不是有效的 RSA*
。
handle
無效
備註
重要
OpenSSL 支援在相同進程中載入多個連結庫版本。 呼叫這個建構函式之前,請確認您的指標值來自這個類別所使用的相同 OpenSSL 版本。 如需詳細資訊,請參閱OpenSslVersion。
適用於
RSAOpenSsl(RSAParameters)
使用指定的金鑰參數,以初始化 RSAOpenSsl 類別的新執行個體。
public:
RSAOpenSsl(System::Security::Cryptography::RSAParameters parameters);
public RSAOpenSsl (System.Security.Cryptography.RSAParameters parameters);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public RSAOpenSsl (System.Security.Cryptography.RSAParameters parameters);
new System.Security.Cryptography.RSAOpenSsl : System.Security.Cryptography.RSAParameters -> System.Security.Cryptography.RSAOpenSsl
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.RSAOpenSsl : System.Security.Cryptography.RSAParameters -> System.Security.Cryptography.RSAOpenSsl
Public Sub New (parameters As RSAParameters)
參數
- parameters
- RSAParameters
金鑰的參數。
- 屬性
例外狀況
parameters
不是有效的 RSA 金鑰。
備註
此建構函式相當於使用預設建構函式並呼叫 ImportParameters。
適用於
RSAOpenSsl(SafeEvpPKeyHandle)
從以 表示EVP_PKEY*
的現有 OpenSSL 索引鍵,初始化 類別的新實例RSAOpenSsl。
public:
RSAOpenSsl(System::Security::Cryptography::SafeEvpPKeyHandle ^ pkeyHandle);
public RSAOpenSsl (System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public RSAOpenSsl (System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);
new System.Security.Cryptography.RSAOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.RSAOpenSsl
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.RSAOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.RSAOpenSsl
Public Sub New (pkeyHandle As SafeEvpPKeyHandle)
參數
- pkeyHandle
- SafeEvpPKeyHandle
要當做索引鍵使用的 OpenSSL EVP_PKEY*
值,表示為 SafeEvpPKeyHandle。
- 屬性
例外狀況
pkeyHandle
不代表 RSA 金鑰。
pkeyHandle
是 null
pkeyHandle
根據 IsInvalid無效。
備註
重要
OpenSSL 支援在相同進程中載入多個連結庫版本。 呼叫這個建構函式之前,請確認您的指標值來自這個類別所使用的相同 OpenSSL 版本。 如需詳細資訊,請參閱OpenSslVersion。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應