RSA RSA RSA RSA Class

定义

表示 RSA 算法的所有实现均从中继承的基类。Represents the base class from which all implementations of the RSA algorithm inherit.

public ref class RSA abstract : System::Security::Cryptography::AsymmetricAlgorithm
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class RSA : System.Security.Cryptography.AsymmetricAlgorithm
type RSA = class
    inherit AsymmetricAlgorithm
Public MustInherit Class RSA
Inherits AsymmetricAlgorithm
继承
派生
属性

注解

扩展此类可证明你要实现一个RSA密钥。Extending this class proves that you are implementing an RSA key. 这对于任何提供新RSA密钥实现的开发人员都是必需的。This is required for any developer providing a new RSA key implementation.

此类的唯一用途是作为RSA算法标识的层次结构成员。The only purpose of this class is as a hierarchy member for identification of the RSA algorithm.

如果安装了 Microsoft Enhanced Cryptographic Provider,则 RSACryptoServiceProvider 支持长度为 384 位至 16384 位(增量为 8 位)的密钥。The RSACryptoServiceProvider supports key lengths from 384 bits to 16384 bits in increments of 8 bits if you have the Microsoft Enhanced Cryptographic Provider installed. 如果安装了 Microsoft Base Cryptographic Provider,则它支持长度为 384 位至 512 位(增量为 8 位)的密钥。It supports key lengths from 384 bits to 512 bits in increments of 8 bits if you have the Microsoft Base Cryptographic Provider installed.

构造函数

RSA() RSA() RSA() RSA()

初始化 RSA 类的新实例。Initializes a new instance of the RSA class.

属性

KeyExchangeAlgorithm KeyExchangeAlgorithm KeyExchangeAlgorithm KeyExchangeAlgorithm

获取可用于 RSA 的此实现的密钥交换算法的名称。Gets the name of the key exchange algorithm available with this implementation of RSA.

KeySize KeySize KeySize KeySize

获取或设置非对称算法所用密钥模块的大小(以位为单位)。Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)
LegalKeySizes LegalKeySizes LegalKeySizes LegalKeySizes

获取非对称算法支持的密钥大小。Gets the key sizes that are supported by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)
SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm SignatureAlgorithm

获取可用于 RSA 的此实现的签名算法的名称。Gets the name of the signature algorithm available with this implementation of RSA.

方法

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

释放 AsymmetricAlgorithm 类使用的所有资源。Releases all resources used by the AsymmetricAlgorithm class.

(Inherited from AsymmetricAlgorithm)
Create() Create() Create() Create()

创建 RSA 算法的默认实现的实例。Creates an instance of the default implementation of the RSA algorithm.

Create(Int32) Create(Int32) Create(Int32) Create(Int32)

创建具有指定密钥大小的新临时 RSA 密钥。Creates a new ephemeral RSA key with the specified key size.

Create(RSAParameters) Create(RSAParameters) Create(RSAParameters) Create(RSAParameters)

创建具有指定 RSA 密钥参数的新临时 RSA 密钥。Creates a new ephemeral RSA key with the specified RSA key parameters.

Create(String) Create(String) Create(String) Create(String)

创建 RSA 的指定实现的实例。Creates an instance of the specified implementation of RSA.

Decrypt(Byte[], RSAEncryptionPadding) Decrypt(Byte[], RSAEncryptionPadding) Decrypt(Byte[], RSAEncryptionPadding) Decrypt(Byte[], RSAEncryptionPadding)

在派生类中被重写时,使用指定的填充模式来解密输入数据。When overridden in a derived class, decrypts the input data using the specified padding mode.

DecryptValue(Byte[]) DecryptValue(Byte[]) DecryptValue(Byte[]) DecryptValue(Byte[])

当在派生类中重写时,使用私钥解密输入数据。When overridden in a derived class, decrypts the input data using the private key.

Dispose() Dispose() Dispose() Dispose()

释放 AsymmetricAlgorithm 类的当前实例所使用的所有资源。Releases all resources used by the current instance of the AsymmetricAlgorithm class.

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

释放 AsymmetricAlgorithm 类使用的非托管资源,并可以选择释放托管资源。Releases the unmanaged resources used by the AsymmetricAlgorithm class and optionally releases the managed resources.

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

在派生类中被重写时,使用指定的填充模式加密输入数据。When overridden in a derived class, encrypts the input data using the specified padding mode.

EncryptValue(Byte[]) EncryptValue(Byte[]) EncryptValue(Byte[]) EncryptValue(Byte[])

当在派生类中重写时,使用公钥加密输入数据。When overridden in a derived class, encrypts the input data using the public key.

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)

使用基于字节的密码以 PKCS#8 EncryptedPrivateKeyInfo 格式导出当前密钥。Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password.

(Inherited from AsymmetricAlgorithm)
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters) ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters)

使用基于字符的密码以 PKCS#8 EncryptedPrivateKeyInfo 格式导出当前密钥。Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password.

(Inherited from AsymmetricAlgorithm)
ExportParameters(Boolean) ExportParameters(Boolean) ExportParameters(Boolean) ExportParameters(Boolean)

当在派生类中重写时,导出 RSAParametersWhen overridden in a derived class, exports the RSAParameters.

ExportPkcs8PrivateKey() ExportPkcs8PrivateKey() ExportPkcs8PrivateKey() ExportPkcs8PrivateKey()

以 PKCS#8 PrivateKeyInfo 格式导出当前密钥。Exports the current key in the PKCS#8 PrivateKeyInfo format.

(Inherited from AsymmetricAlgorithm)
ExportRSAPrivateKey() ExportRSAPrivateKey() ExportRSAPrivateKey() ExportRSAPrivateKey()

以 PKCS#1 RSAPrivateKey 格式导出当前密钥。Exports the current key in the PKCS#1 RSAPrivateKey format.

ExportRSAPublicKey() ExportRSAPublicKey() ExportRSAPublicKey() ExportRSAPublicKey()

以 PKCS#1 RSAPublicKey 格式导出当前密钥的公钥部分。Exports the public-key portion of the current key in the PKCS#1 RSAPublicKey format.

ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo() ExportSubjectPublicKeyInfo()

以 X.509 SubjectPublicKeyInfo 格式导出当前密钥的公钥部分。Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format.

(Inherited from AsymmetricAlgorithm)
FromXmlString(String) FromXmlString(String) FromXmlString(String) FromXmlString(String)

通过 XML 字符串中的密钥信息初始化 RSA 对象。Initializes an RSA object from the key information from an XML string.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

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

获取当前实例的 TypeGets 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.

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.

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

使用基于字节的密码解密之后,从 PKCS#8 EncryptedPrivateKeyInfo 结构中导入公/私钥对,以替换此对象的密钥。Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object.

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32) ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32)

使用基于字符的密码解密之后,从 PKCS#8 EncryptedPrivateKeyInfo 结构中导入公/私钥对,以替换此对象的密钥。Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object.

ImportParameters(RSAParameters) ImportParameters(RSAParameters) ImportParameters(RSAParameters) ImportParameters(RSAParameters)

当在派生类中重写时,导入指定的 RSAParametersWhen overridden in a derived class, imports the specified RSAParameters.

ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32) ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32)

解密后,从 PKCS#8 PrivateKeyInfo 结构中导入公/私钥对,以替换此对象的密钥。Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object.

ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32) ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32) ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32) ImportRSAPrivateKey(ReadOnlySpan<Byte>, Int32)

解密后,从 PKCS#1 RSAPrivateKey 结构中导入公共/私有密钥对,以便替换此对象的密钥。Imports the public/private keypair from a PKCS#1 RSAPrivateKey structure after decryption, replacing the keys for this object.

ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32) ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32) ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32) ImportRSAPublicKey(ReadOnlySpan<Byte>, Int32)

解密后,从 PKCS#1 RSAPublicKey 结构中导入公钥,以便替换此对象的密钥。Imports the public key from a PKCS#1 RSAPublicKey structure after decryption, replacing the keys for this object.

ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32) ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32)

解密后,从 X.509 SubjectPublicKeyInfo 结构中导入公钥,以替换此对象的密钥。Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。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.

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.

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.

SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)

在派生类中重写时,计算指定的哈希值的签名,方法是使用指定填充将其与私钥一起加密。When overridden in a derived class, computes the signature for the specified hash value by encrypting it with the private key using the specified padding.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

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

创建并返回包含当前 RSA 对象的密钥的 XML 字符串。Creates and returns an XML string containing the key of the current RSA object.

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

尝试使用基于字节的密码以 PKCS#8 EncryptedPrivateKeyInfo 格式将当前密钥导出到所提供的缓冲区。Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password.

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)

尝试使用基于字符的密码以 PKCS#8 EncryptedPrivateKeyInfo 格式将当前密钥导入所提供的缓冲区。Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password.

TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32) TryExportPkcs8PrivateKey(Span<Byte>, Int32)

尝试以 PKCS#8 PrivateKeyInfo 格式将当前密钥导出到所提供的缓冲区。Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer.

TryExportRSAPrivateKey(Span<Byte>, Int32) TryExportRSAPrivateKey(Span<Byte>, Int32) TryExportRSAPrivateKey(Span<Byte>, Int32) TryExportRSAPrivateKey(Span<Byte>, Int32)

尝试以 PKCS#1 RSAPrivateKey 格式将当前密钥导入所提供的缓冲区。Attempts to export the current key in the PKCS#1 RSAPrivateKey format into a provided buffer.

TryExportRSAPublicKey(Span<Byte>, Int32) TryExportRSAPublicKey(Span<Byte>, Int32) TryExportRSAPublicKey(Span<Byte>, Int32) TryExportRSAPublicKey(Span<Byte>, Int32)

尝试以 PKCS#1 RSAPublicKey 格式将当前密钥导入所提供的缓冲区。Attempts to export the current key in the PKCS#1 RSAPublicKey format into a provided buffer.

TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) TryExportSubjectPublicKeyInfo(Span<Byte>, Int32)

尝试以 X.509 SubjectPublicKeyInfo 格式将当前密钥导出到所提供的缓冲区。Attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer.

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)
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)
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)
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.

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.

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)
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.

VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)

通过使用指定的哈希算法和填充方式计算签名中的哈希值,然后将其与提供的哈希值进行比较来验证数字签名是否有效。Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value.

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)

字段

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)

显式界面实现

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

有关此成员的说明,请参见 Dispose()For a description of this member, see Dispose().

(Inherited from AsymmetricAlgorithm)

适用于

另请参阅