संपादित करें

इसके माध्यम से साझा किया गया


ECDsaOpenSsl Class

Definition

Provides an implementation of the Elliptic Curve Digital Signature Algorithm (ECDSA) backed by OpenSSL.

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

Remarks

This class should only be used directly when doing platform interop with the system OpenSSL library. When platform interop isn't needed, you should use the ECDsa.Create factory methods instead of a specific derived implementation.

Constructors

ECDsaOpenSsl()

Initializes a new instance of the ECDsaOpenSsl class.

ECDsaOpenSsl(ECCurve)

Initializes a new instance of the ECDsaOpenSsl class and generates a new key on the specified curve.

ECDsaOpenSsl(Int32)

Initializes a new instance of the ECDsaOpenSsl class with a specified target key size.

ECDsaOpenSsl(IntPtr)

Initializes a new instance of the ECDsaOpenSsl class from an existing OpenSSL key represented as an EC_KEY*.

ECDsaOpenSsl(SafeEvpPKeyHandle)

Initializes a new instance of the ECDsaOpenSsl class from an existing OpenSSL key represented as an EVP_PKEY*.

Fields

KeySizeValue

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

(Inherited from AsymmetricAlgorithm)
LegalKeySizesValue

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

(Inherited from AsymmetricAlgorithm)

Properties

KeyExchangeAlgorithm

Gets the name of the key exchange algorithm.

(Inherited from ECDsa)
KeySize

Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.

KeySize

Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.

(Inherited from AsymmetricAlgorithm)
LegalKeySizes

Gets the key sizes, in bits, that are supported by the KeySize property setter.

LegalKeySizes

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

(Inherited from AsymmetricAlgorithm)
SignatureAlgorithm

Gets the name of the signature algorithm.

(Inherited from ECDsa)

Methods

Clear()

Releases all resources used by the AsymmetricAlgorithm class.

(Inherited from AsymmetricAlgorithm)
Dispose()

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

(Inherited from AsymmetricAlgorithm)
Dispose(Boolean)

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

(Inherited from AsymmetricAlgorithm)
DuplicateKeyHandle()

Gets a SafeEvpPKeyHandle representation of the cryptographic key.

Equals(Object)

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

(Inherited from Object)
ExportECPrivateKey()

Exports the current key in the ECPrivateKey format.

(Inherited from ECDsa)
ExportECPrivateKeyPem()

Exports the current key in the ECPrivateKey format, PEM encoded.

(Inherited from ECAlgorithm)
ExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters)

Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password.

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

Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password.

(Inherited from AsymmetricAlgorithm)
ExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters)

Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password, PEM encoded.

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

Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password, PEM encoded.

(Inherited from AsymmetricAlgorithm)
ExportExplicitParameters(Boolean)

Exports the key and explicit curve parameters used by the Elliptic curve cryptography (ECC) object into an ECParameters object.

ExportExplicitParameters(Boolean)

When overridden in a derived class, exports the explicit parameters for an elliptic curve.

(Inherited from ECDsa)
ExportParameters(Boolean)

Exports the key used by the Elliptic curve cryptography (ECC) object into an ECParameters object. If the key was created as a named curve, the Curve field contains named curve parameters; otherwise, it contains explicit parameters.

ExportParameters(Boolean)

When overridden in a derived class, exports the named or explicit parameters for an elliptic curve. If the curve has a name, the Curve field contains named curve parameters, otherwise it contains explicit parameters.

(Inherited from ECDsa)
ExportPkcs8PrivateKey()

Exports the current key in the PKCS#8 PrivateKeyInfo format.

(Inherited from AsymmetricAlgorithm)
ExportPkcs8PrivateKeyPem()

Exports the current key in the PKCS#8 PrivateKeyInfo format, PEM encoded.

(Inherited from AsymmetricAlgorithm)
ExportSubjectPublicKeyInfo()

Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format.

(Inherited from AsymmetricAlgorithm)
ExportSubjectPublicKeyInfoPem()

Exports the public-key portion of the current key in the X.509 SubjectPublicKeyInfo format, PEM encoded.

(Inherited from AsymmetricAlgorithm)
FromXmlString(String)

This method throws in all cases.

(Inherited from ECDsa)
GenerateKey(ECCurve)

Generates a new ephemeral public/private key pair for the specified curve, replacing the current key.

GenerateKey(ECCurve)

When overridden in a derived class, generates a new ephemeral public/private key pair for the specified curve, replacing the current key.

(Inherited from ECDsa)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetMaxSignatureSize(DSASignatureFormat)

Gets the largest size, in bytes, for a signature produced by this key in the indicated format.

(Inherited from ECDsa)
GetType()

Gets the Type of the current instance.

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

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

(Inherited from ECDsa)
HashData(Stream, HashAlgorithmName)

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

(Inherited from ECDsa)
ImportECPrivateKey(ReadOnlySpan<Byte>, Int32)

Imports the public/private keypair from an ECPrivateKey structure, replacing the keys for this object.

(Inherited from ECDsa)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a byte-based password, replacing the keys for this object.

(Inherited from ECDsa)
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>, Int32)

Imports the public/private keypair from a PKCS#8 EncryptedPrivateKeyInfo structure after decrypting with a char-based password, replacing the keys for this object.

(Inherited from ECDsa)
ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object.

(Inherited from ECDsa)
ImportFromEncryptedPem(ReadOnlySpan<Char>, ReadOnlySpan<Char>)

Imports an encrypted RFC 7468 PEM-encoded private key, replacing the keys for this object.

(Inherited from ECDsa)
ImportFromPem(ReadOnlySpan<Char>)

Imports an RFC 7468 PEM-encoded key, replacing the keys for this object.

(Inherited from ECDsa)
ImportParameters(ECParameters)

Replaces the current key for this instance with one using the specified key parameters.

ImportParameters(ECParameters)

When overridden in a derived class, imports the specified parameters.

(Inherited from ECDsa)
ImportPkcs8PrivateKey(ReadOnlySpan<Byte>, Int32)

Imports the public/private keypair from a PKCS#8 PrivateKeyInfo structure after decryption, replacing the keys for this object.

(Inherited from ECDsa)
ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>, Int32)

Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object.

(Inherited from ECDsa)
MemberwiseClone()

Creates a shallow copy of the current Object.

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

Computes the hash value of the specified data and signs it using the specified signature format.

(Inherited from ECDsa)
SignData(Byte[], HashAlgorithmName)

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

(Inherited from ECDsa)
SignData(Byte[], Int32, Int32, HashAlgorithmName, DSASignatureFormat)

Computes the hash value of the specified data and signs it using the specified signature format.

(Inherited from ECDsa)
SignData(Byte[], Int32, Int32, HashAlgorithmName)

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

(Inherited from ECDsa)
SignData(ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

Computes the hash value of the specified data and signs it using the specified signature format.

(Inherited from ECDsa)
SignData(ReadOnlySpan<Byte>, HashAlgorithmName)

Computes the hash value of the specified data and signs it.

(Inherited from ECDsa)
SignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat)

Computes the hash value of the specified data and signs it in the indicated format into the provided buffer.

(Inherited from ECDsa)
SignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName)

Computes the hash value of the specified data and signs it in the indicated format into the provided buffer.

(Inherited from ECDsa)
SignData(Stream, HashAlgorithmName, DSASignatureFormat)

Computes the hash value of the specified data and signs it using the specified signature format.

(Inherited from ECDsa)
SignData(Stream, HashAlgorithmName)

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

(Inherited from ECDsa)
SignDataCore(ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

Computes the hash value of the specified data and signs it using the specified signature format.

(Inherited from ECDsa)
SignDataCore(Stream, HashAlgorithmName, DSASignatureFormat)

Computes the hash value of the specified data and signs it using the specified signature format.

(Inherited from ECDsa)
SignHash(Byte[], DSASignatureFormat)

Computes the ECDSA signature for the specified hash value in the indicated format.

(Inherited from ECDsa)
SignHash(Byte[])

Generates a digital signature for the specified hash value.

SignHash(ReadOnlySpan<Byte>, DSASignatureFormat)

Computes the ECDSA signature for the specified hash value in the indicated format.

(Inherited from ECDsa)
SignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat)

Computes the ECDSA signature for the specified hash value in the indicated format into the provided buffer.

(Inherited from ECDsa)
SignHash(ReadOnlySpan<Byte>, Span<Byte>)

Computes the ECDSA signature for the specified hash value into the provided buffer.

(Inherited from ECDsa)
SignHash(ReadOnlySpan<Byte>)

Computes the ECDSA signature for the specified hash value.

(Inherited from ECDsa)
SignHashCore(ReadOnlySpan<Byte>, DSASignatureFormat)

Computes the ECDSA signature for the specified hash value in the indicated format.

(Inherited from ECDsa)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
ToXmlString(Boolean)

This method throws in all cases.

(Inherited from ECDsa)
TryExportECPrivateKey(Span<Byte>, Int32)

Attempts to export the current key in the ECPrivateKey format into a provided buffer.

(Inherited from ECDsa)
TryExportECPrivateKeyPem(Span<Char>, Int32)

Attempts to export the current key in the PEM-encoded ECPrivateKey format into a provided buffer.

(Inherited from ECAlgorithm)
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a byte-based password.

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

Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format into a provided buffer, using a char-based password.

(Inherited from ECDsa)
TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Byte>, PbeParameters, Span<Char>, Int32)

Attempts to export the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a byte-based password, PEM encoded.

(Inherited from AsymmetricAlgorithm)
TryExportEncryptedPkcs8PrivateKeyPem(ReadOnlySpan<Char>, PbeParameters, Span<Char>, Int32)

Exports the current key in the PKCS#8 EncryptedPrivateKeyInfo format with a char-based password, PEM encoded.

(Inherited from AsymmetricAlgorithm)
TryExportPkcs8PrivateKey(Span<Byte>, Int32)

Attempts to export the current key in the PKCS#8 PrivateKeyInfo format into a provided buffer.

(Inherited from ECDsa)
TryExportPkcs8PrivateKeyPem(Span<Char>, Int32)

Attempts to export the current key in the PEM-encoded PKCS#8 PrivateKeyInfo format into a provided buffer.

(Inherited from AsymmetricAlgorithm)
TryExportSubjectPublicKeyInfo(Span<Byte>, Int32)

Attempts to export the current key in the X.509 SubjectPublicKeyInfo format into a provided buffer.

(Inherited from ECDsa)
TryExportSubjectPublicKeyInfoPem(Span<Char>, Int32)

Attempts to export the current key in the PEM-encoded X.509 SubjectPublicKeyInfo format into a provided buffer.

(Inherited from AsymmetricAlgorithm)
TryHashData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

Attempts to compute the hash value of the specified read-only span of bytes into the provided destination by using the specified hashing algorithm.

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

Attempts to create the ECDSA signature for the specified data in the indicated format into the provided buffer.

(Inherited from ECDsa)
TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

Attempts to compute the ECDSA digital signature for the specified read-only span of bytes into the provided destination by using the specified hashing algorithm and the current key.

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

Attempts to create the ECDSA signature for the specified data in the indicated format into the provided buffer.

(Inherited from ECDsa)
TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat, Int32)

Attempts to create the ECDSA signature for the specified hash value in the indicated format into the provided buffer.

(Inherited from ECDsa)
TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, Int32)

Attempts to compute the ECDSA digital signature for the specified read-only span of bytes representing a data hash into the provided destination by using the current key.

(Inherited from ECDsa)
TrySignHashCore(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat, Int32)

Attempts to create the ECDSA signature for the specified hash value in the indicated format into the provided buffer.

(Inherited from ECDsa)
VerifyData(Byte[], Byte[], HashAlgorithmName, DSASignatureFormat)

Verifies that a digital signature is valid for the provided data.

(Inherited from ECDsa)
VerifyData(Byte[], Byte[], HashAlgorithmName)

Verifies that a digital signature is appropriate for the current key and provided data with a specified hash algorithm.

(Inherited from ECDsa)
VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, DSASignatureFormat)

Verifies that a digital signature is valid for the provided data.

(Inherited from ECDsa)
VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName)

Verifies that a digital signature is appropriate for the current key and provided portion of data with a specified hash algorithm.

(Inherited from ECDsa)
VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

Verifies that a digital signature is valid for the provided data.

(Inherited from ECDsa)
VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName)

Verifies that a digital signature is appropriate for the current key and provided data with a specified hash algorithm.

(Inherited from ECDsa)
VerifyData(Stream, Byte[], HashAlgorithmName, DSASignatureFormat)

Verifies that a digital signature is valid for the provided data.

(Inherited from ECDsa)
VerifyData(Stream, Byte[], HashAlgorithmName)

Verifies that a digital signature is appropriate for the current key and provided data with a specified hash algorithm.

(Inherited from ECDsa)
VerifyDataCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

Verifies that a digital signature is valid for the provided data.

(Inherited from ECDsa)
VerifyDataCore(Stream, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

Verifies that a digital signature is valid for the provided data.

(Inherited from ECDsa)
VerifyHash(Byte[], Byte[], DSASignatureFormat)

Verifies that a digital signature is valid for the provided hash.

(Inherited from ECDsa)
VerifyHash(Byte[], Byte[])

Verifies that a digital signature is appropriate for the current key and provided data hash.

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

Verifies that a digital signature is valid for the provided hash.

(Inherited from ECDsa)
VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Verifies that a digital signature is appropriate for the current key and provided data hash.

(Inherited from ECDsa)
VerifyHashCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, DSASignatureFormat)

Verifies that a digital signature is valid for the provided hash.

(Inherited from ECDsa)

Applies to