ECDsa 类

定义

提供封装椭圆曲线数字签名算法(ECDSA)的抽象基类。

public ref class ECDsa abstract : System::Security::Cryptography::ECAlgorithm
public ref class ECDsa abstract : System::Security::Cryptography::AsymmetricAlgorithm
public abstract class ECDsa : System.Security.Cryptography.ECAlgorithm
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class ECDsa : System.Security.Cryptography.AsymmetricAlgorithm
public abstract class ECDsa : System.Security.Cryptography.AsymmetricAlgorithm
type ECDsa = class
    inherit ECAlgorithm
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
type ECDsa = class
    inherit AsymmetricAlgorithm
type ECDsa = class
    inherit AsymmetricAlgorithm
Public MustInherit Class ECDsa
Inherits ECAlgorithm
Public MustInherit Class ECDsa
Inherits AsymmetricAlgorithm
继承
继承
派生
属性

注解

此类充当派生的 ECDsaCng 抽象基类。

构造函数

名称 说明
ECDsa()

初始化 ECDsa 类的新实例。

字段

名称 说明
KeySizeValue

表示非对称算法使用的键模数的大小(以位为单位)。

(继承自 AsymmetricAlgorithm)
LegalKeySizesValue

指定非对称算法支持的密钥大小。

(继承自 AsymmetricAlgorithm)

属性

名称 说明
KeyExchangeAlgorithm

获取密钥交换算法的名称。

KeySize

获取或设置非对称算法使用的键模数的大小(以位为单位)。

(继承自 AsymmetricAlgorithm)
LegalKeySizes

获取非对称算法支持的密钥大小。

(继承自 AsymmetricAlgorithm)
SignatureAlgorithm

获取签名算法的名称。

方法

名称 说明
Clear()

释放类使用 AsymmetricAlgorithm 的所有资源。

(继承自 AsymmetricAlgorithm)
Create()

创建椭圆曲线数字签名算法(ECDSA)的默认实现的新实例。

Create(ECCurve)

使用新生成的密钥在指定曲线上创建椭圆曲线数字签名算法(ECDSA)的默认实现的新实例。

Create(ECParameters)

使用指定的参数作为键创建椭圆曲线数字签名算法(ECDSA)的默认实现的新实例。

Create(String)
已过时.

创建椭圆曲线数字签名算法(ECDSA)的指定实现的新实例。

Dispose()

释放类的 AsymmetricAlgorithm 当前实例使用的所有资源。

(继承自 AsymmetricAlgorithm)
Dispose(Boolean)

释放类使用 AsymmetricAlgorithm 的非托管资源,并选择性地释放托管资源。

(继承自 AsymmetricAlgorithm)
Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
ExportECPrivateKey()

导出 ECPrivateKey 格式的当前密钥。

ExportECPrivateKey()

导出 ECPrivateKey 格式的当前密钥。

(继承自 ECAlgorithm)
ExportECPrivateKeyPem()

导出 ECPrivateKey 格式的当前密钥(已编码 PEM)。

(继承自 ECAlgorithm)
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters)

使用基于字节的密码导出 PKCS#8 EncryptedPrivateKeyInfo 格式的当前密钥。

(继承自 AsymmetricAlgorithm)
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters)

使用基于字符的密码导出 PKCS#8 EncryptedPrivateKeyInfo 格式的当前密钥。

(继承自 AsymmetricAlgorithm)
ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters)

使用基于字节的密码 PEM 编码导出 PKCS#8 EncryptedPrivateKeyInfo 格式的当前密钥。

(继承自 AsymmetricAlgorithm)
ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Char>, PbeParameters)

使用基于字符的密码 PEM 编码导出 PKCS#8 EncryptedPrivateKeyInfo 格式的当前密钥。

(继承自 AsymmetricAlgorithm)
ExportExplicitParameters(Boolean)

在派生类中重写时,导出椭圆曲线的显式参数。

ExportExplicitParameters(Boolean)

在派生类中重写时,导出 ECCurve 的显式 ECParameters

(继承自 ECAlgorithm)
ExportParameters(Boolean)

在派生类中重写时,导出椭圆曲线的命名或显式参数。 如果曲线具有名称,则 Curve 字段包含命名曲线参数,否则它包含显式参数。

ExportParameters(Boolean)

在派生类中重写时,导出 ECCurve 的命名或显式 ECParameters 。 如果曲线具有名称,则 Curve 属性将包含命名曲线参数,否则它将包含显式参数。

(继承自 ECAlgorithm)
ExportPkcs8PrivateKey()

导出 PKCS#8 PrivateKeyInfo 格式的当前密钥。

(继承自 AsymmetricAlgorithm)
ExportPkcs8PrivateKeyPem()

导出 PKCS#8 PrivateKeyInfo 格式的当前密钥(已编码 PEM)。

(继承自 AsymmetricAlgorithm)
ExportSubjectPublicKeyInfo()

以 X.509 SubjectPublicKeyInfo 格式导出当前密钥的公钥部分。

(继承自 AsymmetricAlgorithm)
ExportSubjectPublicKeyInfoPem()

以 X.509 SubjectPublicKeyInfo 格式(PEM 编码)导出当前密钥的公钥部分。

(继承自 AsymmetricAlgorithm)
FromXmlString(String)

此方法在所有情况下都引发。

FromXmlString(String)

在派生类中重写时,从 XML 字符串重新构造对象 AsymmetricAlgorithm 。 否则,将引发 NotImplementedException

(继承自 AsymmetricAlgorithm)
GenerateKey(ECCurve)

在派生类中重写时,为指定的曲线生成新的临时公钥/私钥对,并替换当前密钥。

GenerateKey(ECCurve)

在派生类中重写时,为指定的曲线生成新的公钥/私钥对。

(继承自 ECAlgorithm)
GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetMaxSignatureSize(DSASignatureFormat)

获取此键以指示格式生成的签名的最大大小(以字节为单位)。

GetType()

获取当前实例的 Type

(继承自 Object)
HashData(Byte[], Int32, Int32, HashAlgorithmName)

在派生类中重写时,使用指定的哈希算法计算字节数组的指定部分的哈希值。

HashData(Stream, HashAlgorithmName)

在派生类中重写时,使用指定的哈希算法计算指定的二进制流的哈希值。

ImportECPrivateKey(ReadOnlySpan<Byte>, Int32)

从 ECPrivateKey 结构导入公钥/私钥对,替换此对象的密钥。

ImportECPrivateKey(ReadOnlySpan<Byte>, Int32)

从 ECPrivateKey 结构导入公钥/私钥对,替换此对象的密钥。

(继承自 ECAlgorithm)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

使用基于字节的密码解密后,从 PKCS#8 EncryptedPrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

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

使用基于字节的密码解密后,从 PKCS#8 EncryptedPrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

(继承自 ECAlgorithm)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

在派生类中重写时,使用基于字节的密码解密后,从 PKCS#8 EncryptedPrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

(继承自 AsymmetricAlgorithm)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32)

使用基于字符的密码解密后,从 PKCS#8 EncryptedPrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

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

使用基于字节的密码解密后,从 PKCS#8 EncryptedPrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

(继承自 ECAlgorithm)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32)

在派生类中重写时,使用基于字符的密码解密后,从 PKCS#8 EncryptedPrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

(继承自 AsymmetricAlgorithm)
ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

导入加密的 RFC 7468 PEM 编码私钥,替换此对象的密钥。

ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

导入加密的 RFC 7468 PEM 编码私钥,替换此对象的密钥。

(继承自 ECAlgorithm)
ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

导入加密的 RFC 7468 PEM 编码私钥,替换此对象的密钥。

ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

导入加密的 RFC 7468 PEM 编码私钥,替换此对象的密钥。

(继承自 ECAlgorithm)
ImportFromPem(ReadOnlySpan<Char>)

导入 RFC 7468 PEM 编码的密钥,替换此对象的密钥。

ImportFromPem(ReadOnlySpan<Char>)

导入 RFC 7468 PEM 编码的密钥,替换此对象的密钥。

(继承自 ECAlgorithm)
ImportParameters(ECParameters)

在派生类中重写时,导入指定的参数。

ImportParameters(ECParameters)

在派生类中重写时,导入指定的 ECParameters

(继承自 ECAlgorithm)
ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32)

解密后,从 PKCS#8 PrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32)

解密后,从 PKCS#8 PrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

(继承自 ECAlgorithm)
ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32)

在派生类中重写时,在解密后从 PKCS#8 PrivateKeyInfo 结构导入公钥/私钥对,替换此对象的密钥。

(继承自 AsymmetricAlgorithm)
ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32)

解密后,从 X.509 SubjectPublicKeyInfo 结构导入公钥,替换此对象的密钥。

ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32)

解密后,从 X.509 SubjectPublicKeyInfo 结构导入公钥,替换此对象的密钥

(继承自 ECAlgorithm)
ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32)

在派生类中重写时,在解密后从 X.509 SubjectPublicKeyInfo 结构导入公钥,替换此对象的密钥。

(继承自 AsymmetricAlgorithm)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
SignData(Byte[], HashAlgorithmName, DSASignatureFormat)

计算指定数据的哈希值,并使用指定的签名格式对其进行签名。

SignData(Byte[], HashAlgorithmName)

使用指定的哈希算法计算指定字节数组的哈希值,并对生成的哈希值进行签名。

SignData(Byte[], Int32, Int32, HashAlgorithmName, DSASignatureFormat)

计算指定数据的哈希值,并使用指定的签名格式对其进行签名。

SignData(Byte[], Int32, Int32, HashAlgorithmName)

使用指定的哈希算法计算指定字节数组的一部分的哈希值,并对生成的哈希值进行签名。

SignData(ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

计算指定数据的哈希值,并使用指定的签名格式对其进行签名。

SignData(ReadOnlySpan<Byte>, HashAlgorithmName)

计算指定数据的哈希值并对其进行签名。

SignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat)

计算指定数据的哈希值,并将其以指示格式签名到提供的缓冲区中。

SignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName)

计算指定数据的哈希值,并将其以指示格式签名到提供的缓冲区中。

SignData(Stream, HashAlgorithmName, DSASignatureFormat)

计算指定数据的哈希值,并使用指定的签名格式对其进行签名。

SignData(Stream, HashAlgorithmName)

使用指定的哈希算法计算指定流的哈希值,并对生成的哈希值进行签名。

SignDataCore(ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

计算指定数据的哈希值,并使用指定的签名格式对其进行签名。

SignDataCore(Stream, HashAlgorithmName, DSASignatureFormat)

计算指定数据的哈希值,并使用指定的签名格式对其进行签名。

SignHash(Byte[], DSASignatureFormat)

以指示格式计算指定哈希值的 ECDSA 签名。

SignHash(Byte[])

为指定的哈希值生成数字签名。

SignHash(ReadOnlySpan<Byte>, DSASignatureFormat)

以指示格式计算指定哈希值的 ECDSA 签名。

SignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat)

将指定哈希值的 ECDSA 签名(以指示的格式)计算到提供的缓冲区中。

SignHash(ReadOnlySpan<Byte>, Span<Byte>)

将指定哈希值的 ECDSA 签名计算到提供的缓冲区中。

SignHash(ReadOnlySpan<Byte>)

计算指定哈希值的 ECDSA 签名。

SignHashCore(ReadOnlySpan<Byte>, DSASignatureFormat)

以指示格式计算指定哈希值的 ECDSA 签名。

ToString()

返回一个表示当前对象的字符串。

(继承自 Object)
ToXmlString(Boolean)

此方法在所有情况下都引发。

ToXmlString(Boolean)

在派生类中重写时,创建并返回当前 AsymmetricAlgorithm 对象的 XML 字符串表示形式。 否则,将引发 NotImplementedException

(继承自 AsymmetricAlgorithm)
TryExportECPrivateKey(Span<Byte>, Int32)

尝试将 ECPrivateKey 格式的当前密钥导出到提供的缓冲区。

TryExportECPrivateKey(Span<Byte>, Int32)

尝试将 ECPrivateKey 格式的当前密钥导出到提供的缓冲区。

(继承自 ECAlgorithm)
TryExportECPrivateKeyPem(Span<Char>, Int32)

尝试将 PEM 编码的 ECPrivateKey 格式中的当前密钥导出到提供的缓冲区。

(继承自 ECAlgorithm)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

尝试使用基于字节的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

尝试使用基于字节的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 ECAlgorithm)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

在派生类中重写时,尝试使用基于字节的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 AsymmetricAlgorithm)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)

尝试使用基于字符的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)

尝试使用基于字符的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 ECAlgorithm)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)

在派生类中重写时,尝试使用基于字符的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 AsymmetricAlgorithm)
TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters, Span<Char>, Int32)

尝试使用基于字节的密码 PEM 编码导出 PKCS#8 EncryptedPrivateKeyInfo 格式的当前密钥。

(继承自 AsymmetricAlgorithm)
TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Char>, PbeParameters, Span<Char>, Int32)

使用基于字符的密码 PEM 编码导出 PKCS#8 EncryptedPrivateKeyInfo 格式的当前密钥。

(继承自 AsymmetricAlgorithm)
TryExportPkcs8PrivateKey(Span<Byte>, Int32)

尝试将 PKCS#8 PrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

TryExportPkcs8PrivateKey(Span<Byte>, Int32)

尝试将 PKCS#8 PrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 ECAlgorithm)
TryExportPkcs8PrivateKey(Span<Byte>, Int32)

在派生类中重写时,尝试将 PKCS#8 PrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 AsymmetricAlgorithm)
TryExportPkcs8PrivateKeyPem(Span<Char>, Int32)

尝试将 PEM 编码的 PKCS#8 PrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 AsymmetricAlgorithm)
TryExportSubjectPublicKeyInfo(Span<Byte>, Int32)

尝试将 X.509 SubjectPublicKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

TryExportSubjectPublicKeyInfo(Span<Byte>, Int32)

尝试将 X.509 SubjectPublicKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 ECAlgorithm)
TryExportSubjectPublicKeyInfo(Span<Byte>, Int32)

在派生类中重写时,尝试将 X.509 SubjectPublicKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 AsymmetricAlgorithm)
TryExportSubjectPublicKeyInfoPem(Span<Char>, Int32)

尝试将 PEM 编码的 X.509 SubjectPublicKeyInfo 格式中的当前密钥导出到提供的缓冲区中。

(继承自 AsymmetricAlgorithm)
TryHashData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

尝试使用指定的哈希算法将指定只读字节范围的哈希值计算到提供的目标中。

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

尝试将指定格式的指定数据创建 ECDSA 签名,并将其写入提供的缓冲区。

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

尝试使用指定的哈希算法和当前密钥将指定的只读字节范围计算到提供的目标的 ECDSA 数字签名。

TrySignDataCore(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

尝试将指定格式的指定数据创建 ECDSA 签名,并将其写入提供的缓冲区。

TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat, Int32)

尝试为指定的哈希值创建 ECDSA 签名,其格式为提供的缓冲区。

TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, Int32)

尝试使用当前密钥计算指定只读字节范围的 ECDSA 数字签名,该字节表示数据哈希到提供的目标。

TrySignHashCore(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat, Int32)

尝试为指定的哈希值创建 ECDSA 签名,其格式为提供的缓冲区。

VerifyData(Byte[], Byte[], HashAlgorithmName, DSASignatureFormat)

验证数字签名是否对所提供的数据有效。

VerifyData(Byte[], Byte[], HashAlgorithmName)

验证数字签名是否适合当前密钥,并使用指定的哈希算法提供的数据。

VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, DSASignatureFormat)

验证数字签名是否对所提供的数据有效。

VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName)

验证数字签名是否适合当前密钥,并使用指定的哈希算法提供的数据部分。

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

验证数字签名是否对所提供的数据有效。

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName)

验证数字签名是否适合当前密钥,并使用指定的哈希算法提供的数据。

VerifyData(Stream, Byte[], HashAlgorithmName, DSASignatureFormat)

验证数字签名是否对所提供的数据有效。

VerifyData(Stream, Byte[], HashAlgorithmName)

验证数字签名是否适合当前密钥,并使用指定的哈希算法提供的数据。

VerifyDataCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

验证数字签名是否对所提供的数据有效。

VerifyDataCore(Stream, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

验证数字签名是否对所提供的数据有效。

VerifyHash(Byte[], Byte[], DSASignatureFormat)

验证数字签名是否对提供的哈希有效。

VerifyHash(Byte[], Byte[])

验证数字签名是否适合当前密钥和提供的数据哈希。

VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, DSASignatureFormat)

验证数字签名是否对提供的哈希有效。

VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

验证数字签名是否适合当前密钥和提供的数据哈希。

VerifyHashCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, DSASignatureFormat)

验证数字签名是否对提供的哈希有效。

显式接口实现

名称 说明
IDisposable.Dispose()

此 API 支持产品基础结构,不能在代码中直接使用。

有关此成员的说明,请参阅 Dispose()

(继承自 AsymmetricAlgorithm)

适用于