RSAOpenSsl Konstruktor

Definisi

Overload

RSAOpenSsl()

Menginisialisasi instans baru kelas RSAOpenSsl dengan pasangan kunci acak 2048-bit.

RSAOpenSsl(Int32)

Menginisialisasi instans baru kelas RSAOpenSsl dengan kunci yang dihasilkan secara acak dari ukuran yang ditentukan.

RSAOpenSsl(IntPtr)

Menginisialisasi instans baru kelas RSAOpenSsl dari kunci OpenSSL yang ada yang diwakili sebagai RSA*.

RSAOpenSsl(RSAParameters)

Menginisialisasi instans baru kelas RSAOpenSsl menggunakan parameter kunci tertentu.

RSAOpenSsl(SafeEvpPKeyHandle)

Menginisialisasi instans baru kelas RSAOpenSsl dari kunci OpenSSL yang ada yang diwakili sebagai EVP_PKEY*.

RSAOpenSsl()

Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs

Menginisialisasi instans baru kelas RSAOpenSsl dengan pasangan kunci acak 2048-bit.

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 ()
Atribut

Keterangan

Konstruktor ini tidak segera menghasilkan keypair publik/privat baru. Konstruktor ini mengatur properti KeySize ke 2048 dan ketika kunci diperlukan, satu dibuat menggunakan nilai properti. Jika kunci dimuat melalui metode ImportParameters atau metode impor kunci lainnya, ukuran kunci dari konstruktor ini tidak memiliki arti.

Berlaku untuk

RSAOpenSsl(Int32)

Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs

Menginisialisasi instans baru kelas RSAOpenSsl dengan kunci yang dihasilkan secara acak dari ukuran yang ditentukan.

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)

Parameter

keySize
Int32

Ukuran kunci yang akan dihasilkan dalam bit.

Atribut

Pengecualian

keySize tidak valid.

Berlaku untuk

RSAOpenSsl(IntPtr)

Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs

Menginisialisasi instans baru kelas RSAOpenSsl dari kunci OpenSSL yang ada yang diwakili sebagai RSA*.

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)

Parameter

handle
IntPtr

nativeint

Nilai RSA* OpenSSL untuk digunakan sebagai kunci.

Atribut

Pengecualian

handle bukan RSA*yang valid.

handle tidak valid

Keterangan

Penting

OpenSSL mendukung beberapa versi pustaka yang dimuat dalam proses yang sama. Sebelum memanggil konstruktor ini, verifikasi bahwa nilai pointer Anda berasal dari versi OpenSSL yang sama dengan yang digunakan kelas ini. Untuk informasi selengkapnya, lihat OpenSslVersion.

Berlaku untuk

RSAOpenSsl(RSAParameters)

Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs

Menginisialisasi instans baru kelas RSAOpenSsl menggunakan parameter kunci tertentu.

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)

Parameter

parameters
RSAParameters

Parameter untuk kunci.

Atribut

Pengecualian

parameters bukan kunci RSA yang valid.

Keterangan

Konstruktor ini setara dengan menggunakan konstruktor default dan memanggil ImportParameters.

Berlaku untuk

RSAOpenSsl(SafeEvpPKeyHandle)

Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs
Sumber:
RSAOpenSsl.cs

Menginisialisasi instans baru kelas RSAOpenSsl dari kunci OpenSSL yang ada yang diwakili sebagai EVP_PKEY*.

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)

Parameter

pkeyHandle
SafeEvpPKeyHandle

Nilai EVP_PKEY* OpenSSL untuk digunakan sebagai kunci, direpresentasikan sebagai SafeEvpPKeyHandle.

Atribut

Pengecualian

pkeyHandle tidak mewakili kunci RSA.

pkeyHandle null

pkeyHandle tidak valid menurut IsInvalid.

Keterangan

Dalam .NET 9 dan versi yang lebih baru, modifikasi eksternal pkeyHandle juga memengaruhi handel yang disimpan dalam instans yang dibuat konstruktor ini.

Penting

OpenSSL mendukung beberapa versi pustaka yang dimuat dalam proses yang sama. Sebelum memanggil konstruktor ini, verifikasi bahwa nilai pointer Anda berasal dari versi OpenSSL yang sama dengan yang digunakan kelas ini. Untuk informasi selengkapnya, lihat OpenSslVersion.

Berlaku untuk