RSAOpenSsl RSAOpenSsl RSAOpenSsl RSAOpenSsl Class

Definition

public ref class RSAOpenSsl sealed : System::Security::Cryptography::RSA
public sealed class RSAOpenSsl : System.Security.Cryptography.RSA
type RSAOpenSsl = class
    inherit RSA
Public NotInheritable Class RSAOpenSsl
Inherits RSA
Inheritance

Remarks

Note

The RSAOpenSsl class is an implementation of the RSA algorithm using OpenSSL. It isn't available on Windows and is only available on other operating systems when OpenSSL is installed. For applications which aren't doing OpenSSL-specific interop, you're encouraged to use RSA.Create instead of referencing this type directly.

Constructors

RSAOpenSsl() RSAOpenSsl() RSAOpenSsl() RSAOpenSsl()
RSAOpenSsl(Int32) RSAOpenSsl(Int32) RSAOpenSsl(Int32) RSAOpenSsl(Int32)
RSAOpenSsl(IntPtr) RSAOpenSsl(IntPtr) RSAOpenSsl(IntPtr) RSAOpenSsl(IntPtr)
RSAOpenSsl(RSAParameters) RSAOpenSsl(RSAParameters) RSAOpenSsl(RSAParameters) RSAOpenSsl(RSAParameters)
RSAOpenSsl(SafeEvpPKeyHandle) RSAOpenSsl(SafeEvpPKeyHandle) RSAOpenSsl(SafeEvpPKeyHandle) RSAOpenSsl(SafeEvpPKeyHandle)

Properties

KeyExchangeAlgorithm KeyExchangeAlgorithm KeyExchangeAlgorithm KeyExchangeAlgorithm

Gets the name of the key exchange algorithm available with this implementation of RSA.

(Inherited from RSA)
KeySize KeySize KeySize KeySize
LegalKeySizes LegalKeySizes LegalKeySizes LegalKeySizes
SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm

Gets the name of the signature algorithm available with this implementation of RSA.

(Inherited from RSA)

Methods

Clear() Clear() Clear() Clear()

Releases all resources used by the AsymmetricAlgorithm class.

(Inherited from AsymmetricAlgorithm)
Decrypt(Byte[], RSAEncryptionPadding) Decrypt(Byte[], RSAEncryptionPadding) Decrypt(Byte[], RSAEncryptionPadding) Decrypt(Byte[], RSAEncryptionPadding)
DecryptValue(Byte[]) DecryptValue(Byte[]) DecryptValue(Byte[]) DecryptValue(Byte[])

When overridden in a derived class, decrypts the input data using the private key.

(Inherited from RSA)
Dispose() Dispose() Dispose() Dispose()

Releases all resources used by the current instance of the AsymmetricAlgorithm class.

(Inherited from AsymmetricAlgorithm)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources used by the AsymmetricAlgorithm class and optionally releases the managed resources.

(Inherited from AsymmetricAlgorithm)
DuplicateKeyHandle() DuplicateKeyHandle() DuplicateKeyHandle() DuplicateKeyHandle()
Encrypt(Byte[], RSAEncryptionPadding) Encrypt(Byte[], RSAEncryptionPadding) Encrypt(Byte[], RSAEncryptionPadding) Encrypt(Byte[], RSAEncryptionPadding)
EncryptValue(Byte[]) EncryptValue(Byte[]) EncryptValue(Byte[]) EncryptValue(Byte[])

When overridden in a derived class, encrypts the input data using the public key.

(Inherited from RSA)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters) Inherited from AsymmetricAlgorithm
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) Inherited from AsymmetricAlgorithm
ExportParameters(Boolean) ExportParameters(Boolean) ExportParameters(Boolean) ExportParameters(Boolean)
ExportPkcs8PrivateKey() ExportPkcs8PrivateKey() ExportPkcs8PrivateKey() ExportPkcs8PrivateKey() Inherited from AsymmetricAlgorithm
ExportRSAPrivateKey() ExportRSAPrivateKey() ExportRSAPrivateKey() ExportRSAPrivateKey() Inherited from RSA
ExportRSAPublicKey() ExportRSAPublicKey() ExportRSAPublicKey() ExportRSAPublicKey() Inherited from RSA
ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo() Inherited from AsymmetricAlgorithm
FromXmlString(String) FromXmlString(String) FromXmlString(String) FromXmlString(String)

Initializes an RSA object from the key information from an XML string.

(Inherited from RSA)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
HashData(Byte[], Int32, Int32, HashAlgorithmName) HashData(Byte[], Int32, Int32, HashAlgorithmName) HashData(Byte[], Int32, Int32, HashAlgorithmName) HashData(Byte[], Int32, Int32, HashAlgorithmName)

When overridden in a derived class, computes the hash value of a specified portion of a byte array by using a specified hashing algorithm.

(Inherited from RSA)
HashData(Stream, HashAlgorithmName) HashData(Stream, HashAlgorithmName) HashData(Stream, HashAlgorithmName) HashData(Stream, HashAlgorithmName)

When overridden in a derived class, computes the hash value of a specified binary stream by using a specified hashing algorithm.

(Inherited from RSA)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) Inherited from AsymmetricAlgorithm
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) Inherited from AsymmetricAlgorithm
ImportParameters(RSAParameters) ImportParameters(RSAParameters) ImportParameters(RSAParameters) ImportParameters(RSAParameters)
ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) Inherited from AsymmetricAlgorithm
ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32) ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32) ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32) ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32) Inherited from RSA
ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32) ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32) ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32) ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32) Inherited from RSA
ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) Inherited from AsymmetricAlgorithm
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SignData(Byte[], HashAlgorithmName, RSASignaturePadding) SignData(Byte[], HashAlgorithmName, RSASignaturePadding) SignData(Byte[], HashAlgorithmName, RSASignaturePadding) SignData(Byte[], HashAlgorithmName, RSASignaturePadding)

Computes the hash value of the specified byte array using the specified hash algorithm and padding mode, and signs the resulting hash value.

(Inherited from RSA)
SignData(Byte[], Int32, Int32, HashAlgorithmName, RSASignaturePadding) SignData(Byte[], Int32, Int32, HashAlgorithmName, RSASignaturePadding) SignData(Byte[], Int32, Int32, HashAlgorithmName, RSASignaturePadding) SignData(Byte[], Int32, Int32, HashAlgorithmName, RSASignaturePadding)

Computes the hash value of a portion of the specified byte array using the specified hash algorithm and padding mode, and signs the resulting hash value.

(Inherited from RSA)
SignData(Stream, HashAlgorithmName, RSASignaturePadding) SignData(Stream, HashAlgorithmName, RSASignaturePadding) SignData(Stream, HashAlgorithmName, RSASignaturePadding) SignData(Stream, HashAlgorithmName, RSASignaturePadding)

Computes the hash value of the specified stream using the specified hash algorithm and padding mode, and signs the resulting hash value.

(Inherited from RSA)
SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
ToXmlString(Boolean) ToXmlString(Boolean) ToXmlString(Boolean) ToXmlString(Boolean)

Creates and returns an XML string containing the key of the current RSA object.

(Inherited from RSA)
TryDecrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32) TryDecrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32) TryDecrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32) TryDecrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32) Inherited from RSA
TryEncrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32) TryEncrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32) TryEncrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32) TryEncrypt(ReadOnlySpan<Byte>, Span<Byte>, RSAEncryptionPadding, Int32) Inherited from RSA
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) Inherited from AsymmetricAlgorithm
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) Inherited from AsymmetricAlgorithm
TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32) Inherited from AsymmetricAlgorithm
TryExportRSAPrivateKey(Span<Byte>, Int32) TryExportRSAPrivateKey(Span<Byte>, Int32) TryExportRSAPrivateKey(Span<Byte>, Int32) TryExportRSAPrivateKey(Span<Byte>, Int32) Inherited from RSA
TryExportRSAPublicKey(Span<Byte>, Int32) TryExportRSAPublicKey(Span<Byte>, Int32) TryExportRSAPublicKey(Span<Byte>, Int32) TryExportRSAPublicKey(Span<Byte>, Int32) Inherited from RSA
TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) Inherited from AsymmetricAlgorithm
TryHashData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32) TryHashData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32) TryHashData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32) TryHashData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32) Inherited from RSA
TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) Inherited from RSA
TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding, Int32) Inherited from RSA
VerifyData(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)

Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding, and comparing it to the provided signature.

(Inherited from RSA)
VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding)

Verifies that a digital signature is valid by calculating the hash value of the data in a portion of a byte array using the specified hash algorithm and padding, and comparing it to the provided signature.

(Inherited from RSA)
VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) Inherited from RSA
VerifyData(Stream, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Stream, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Stream, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Stream, Byte[], HashAlgorithmName, RSASignaturePadding)

Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and padding, and comparing it to the provided signature.

(Inherited from RSA)
VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)
VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) Inherited from RSA

Fields

KeySizeValue KeySizeValue KeySizeValue KeySizeValue

Represents the size, in bits, of the key modulus used by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)
LegalKeySizesValue LegalKeySizesValue LegalKeySizesValue LegalKeySizesValue

Specifies the key sizes that are supported by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)

Explicit Interface Implementations

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

For a description of this member, see Dispose().

(Inherited from AsymmetricAlgorithm)

Applies to