Język

RSAOpenSsl Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy RSAOpenSsl.

Przeciążenia

Nazwa Opis
RSAOpenSsl()

Inicjuje nowe wystąpienie RSAOpenSsl klasy z losową parą kluczy 2048-bitowych.

RSAOpenSsl(Int32)

Inicjuje nowe wystąpienie RSAOpenSsl klasy z losowo wygenerowanym kluczem o określonym rozmiarze.

RSAOpenSsl(IntPtr)

Inicjuje nowe wystąpienie RSAOpenSsl klasy z istniejącego klucza OpenSSL reprezentowanego RSA*jako .

RSAOpenSsl(RSAParameters)

Inicjuje nowe wystąpienie RSAOpenSsl klasy przy użyciu określonych parametrów klucza.

RSAOpenSsl(SafeEvpPKeyHandle)

Inicjuje nowe wystąpienie RSAOpenSsl klasy z istniejącego klucza OpenSSL reprezentowanego EVP_PKEY*jako .

RSAOpenSsl()

Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs

Inicjuje nowe wystąpienie RSAOpenSsl klasy z losową parą kluczy 2048-bitowych.

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 RSAOpenSsl();
Public Sub New ()
Atrybuty

Uwagi

Ten konstruktor nie generuje natychmiast nowego klucza publicznego/prywatnego. Ten konstruktor ustawia KeySize właściwość na 2048, a gdy jest potrzebny klucz, jest generowany przy użyciu wartości właściwości. Jeśli klucz jest ładowany za pośrednictwem ImportParameters metody lub innej metody importowania klucza, rozmiar klucza z tego konstruktora nie ma znaczenia.

Dotyczy

RSAOpenSsl(Int32)

Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs

Inicjuje nowe wystąpienie RSAOpenSsl klasy z losowo wygenerowanym kluczem o określonym rozmiarze.

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);
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")>]
new System.Security.Cryptography.RSAOpenSsl : int -> System.Security.Cryptography.RSAOpenSsl
new System.Security.Cryptography.RSAOpenSsl : int -> System.Security.Cryptography.RSAOpenSsl
Public Sub New (keySize As Integer)

Parametry

keySize
Int32
Atrybuty

Wyjątki

keySize jest nieprawidłowy.

Dotyczy

RSAOpenSsl(IntPtr)

Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs

Inicjuje nowe wystąpienie RSAOpenSsl klasy z istniejącego klucza OpenSSL reprezentowanego RSA*jako .

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);
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")>]
new System.Security.Cryptography.RSAOpenSsl : nativeint -> System.Security.Cryptography.RSAOpenSsl
new System.Security.Cryptography.RSAOpenSsl : nativeint -> System.Security.Cryptography.RSAOpenSsl
Public Sub New (handle As IntPtr)

Parametry

handle
IntPtr

nativeint

Atrybuty

Wyjątki

handle nie jest prawidłowym RSA*.

handle jest nieprawidłowy

Uwagi

Ważne

Biblioteka OpenSSL obsługuje wiele wersji bibliotek ładowanych w ramach tego samego procesu. Przed wywołaniem tego konstruktora sprawdź, czy wartość wskaźnika pochodzi z tej samej wersji biblioteki OpenSSL, która używa tej klasy. Aby uzyskać więcej informacji, zobacz OpenSslVersion.

Dotyczy

RSAOpenSsl(RSAParameters)

Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs

Inicjuje nowe wystąpienie RSAOpenSsl klasy przy użyciu określonych parametrów klucza.

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);
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")>]
new System.Security.Cryptography.RSAOpenSsl : System.Security.Cryptography.RSAParameters -> System.Security.Cryptography.RSAOpenSsl
new System.Security.Cryptography.RSAOpenSsl : System.Security.Cryptography.RSAParameters -> System.Security.Cryptography.RSAOpenSsl
Public Sub New (parameters As RSAParameters)

Parametry

parameters
RSAParameters
Atrybuty

Wyjątki

parameters nie jest prawidłowym kluczem RSA.

Uwagi

Ten konstruktor jest odpowiednikiem używania konstruktora domyślnego i wywoływania metody ImportParameters.

Dotyczy

RSAOpenSsl(SafeEvpPKeyHandle)

Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs
Źródło:
RSAOpenSsl.cs

Inicjuje nowe wystąpienie RSAOpenSsl klasy z istniejącego klucza OpenSSL reprezentowanego EVP_PKEY*jako .

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);
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")>]
new System.Security.Cryptography.RSAOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.RSAOpenSsl
new System.Security.Cryptography.RSAOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.RSAOpenSsl
Public Sub New (pkeyHandle As SafeEvpPKeyHandle)

Parametry

pkeyHandle
SafeEvpPKeyHandle
Atrybuty

Wyjątki

pkeyHandle nie reprezentuje klucza RSA.

pkeyHandle jest null

pkeyHandle jest nieprawidłowy zgodnie z IsInvalid.

Uwagi

W .NET 9 lub nowszych wersjach zewnętrzne modyfikacje pkeyHandle również wpływają na uchwyt przechowywany w wystąpieniu, które tworzy ten konstruktor.

Ważne

Biblioteka OpenSSL obsługuje wiele wersji bibliotek ładowanych w ramach tego samego procesu. Przed wywołaniem tego konstruktora sprawdź, czy wartość wskaźnika pochodzi z tej samej wersji biblioteki OpenSSL, która używa tej klasy. Aby uzyskać więcej informacji, zobacz OpenSslVersion.

Dotyczy