RSAOpenSsl Konstruktoren

Definition

Initialisiert eine neue Instanz der RSAOpenSsl-Klasse.

Überlädt

Name Beschreibung
RSAOpenSsl()

Initialisiert eine neue Instanz der RSAOpenSsl Klasse mit einem zufälligen 2048-Bit-Schlüsselpaar.

RSAOpenSsl(Int32)

Initialisiert eine neue Instanz der RSAOpenSsl Klasse mit einem zufällig generierten Schlüssel der angegebenen Größe.

RSAOpenSsl(IntPtr)

Initialisiert eine neue Instanz der RSAOpenSsl Klasse aus einem vorhandenen OpenSSL-Schlüssel, der als ein RSA*.

RSAOpenSsl(RSAParameters)

Initialisiert eine neue Instanz der RSAOpenSsl Klasse mit angegebenen Schlüsselparametern.

RSAOpenSsl(SafeEvpPKeyHandle)

Initialisiert eine neue Instanz der RSAOpenSsl Klasse aus einem vorhandenen OpenSSL-Schlüssel, der als ein EVP_PKEY*.

RSAOpenSsl()

Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs

Initialisiert eine neue Instanz der RSAOpenSsl Klasse mit einem zufälligen 2048-Bit-Schlüsselpaar.

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

Hinweise

Dieser Konstruktor generiert sofort keinen neuen öffentlichen/privaten Keypair. Dieser Konstruktor legt die KeySize Eigenschaft auf 2048 fest, und wenn ein Schlüssel benötigt wird, wird eine mithilfe des Eigenschaftswerts generiert. Wenn ein Schlüssel über die ImportParameters Methode oder eine andere Schlüsselimportmethode geladen wird, hat die Schlüsselgröße dieses Konstruktors keine Bedeutung.

Gilt für:

RSAOpenSsl(Int32)

Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs

Initialisiert eine neue Instanz der RSAOpenSsl Klasse mit einem zufällig generierten Schlüssel der angegebenen Größe.

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
Attribute

Ausnahmen

keySize ist ungültig.

Gilt für:

RSAOpenSsl(IntPtr)

Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs

Initialisiert eine neue Instanz der RSAOpenSsl Klasse aus einem vorhandenen OpenSSL-Schlüssel, der als ein 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

Attribute

Ausnahmen

handle ist keine gültige RSA*.

handle ist ungültig.

Hinweise

Von Bedeutung

OpenSSL unterstützt mehrere Bibliotheksversionen, die innerhalb desselben Prozesses geladen werden. Stellen Sie vor dem Aufrufen dieses Konstruktors sicher, dass der Zeigerwert aus derselben Version von OpenSSL stammt, die von dieser Klasse verwendet wird. Weitere Informationen finden Sie unter OpenSslVersion.

Gilt für:

RSAOpenSsl(RSAParameters)

Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs

Initialisiert eine neue Instanz der RSAOpenSsl Klasse mit angegebenen Schlüsselparametern.

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
Attribute

Ausnahmen

parameters ist kein gültiger RSA-Schlüssel.

Hinweise

Dieser Konstruktor entspricht der Verwendung des Standardkonstruktors und des Aufrufens ImportParameters.

Gilt für:

RSAOpenSsl(SafeEvpPKeyHandle)

Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs
Quelle:
RSAOpenSsl.cs

Initialisiert eine neue Instanz der RSAOpenSsl Klasse aus einem vorhandenen OpenSSL-Schlüssel, der als ein 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
Attribute

Ausnahmen

pkeyHandle stellt keinen RSA-Schlüssel dar.

pkeyHandle ist null

pkeyHandle ist gemäß IsInvalid.

Hinweise

In .NET 9 und höheren Versionen wirken sich externe Änderungen von pkeyHandle auch auf das in der Instanz gespeicherte Handle aus, das dieser Konstruktor erstellt.

Von Bedeutung

OpenSSL unterstützt mehrere Bibliotheksversionen, die innerhalb desselben Prozesses geladen werden. Stellen Sie vor dem Aufrufen dieses Konstruktors sicher, dass der Zeigerwert aus derselben Version von OpenSSL stammt, die von dieser Klasse verwendet wird. Weitere Informationen finden Sie unter OpenSslVersion.

Gilt für: