EcdsaVerify Constructor
EcdsaVerify(ECDsa)
Create an instance of the EcdsaVerify class using the ECDsa object that contains the public key.
public EcdsaVerify(ECDsa ecdsa)
Parameters
Type | Name | Description |
---|---|---|
ECDsa | ecdsa | The public key to use to verify. This constructor will copy a reference to this object. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The ecdsa argument is null. |
ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
EcdsaVerify(PivPublicKey)
Create an instance of the EcdsaVerify class using the PIV ECC public key.
public EcdsaVerify(PivPublicKey pivPublicKey)
Parameters
Type | Name | Description |
---|---|---|
PivPublicKey | pivPublicKey | The public key to use to verify. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The pivPublicKey argument is null. |
ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
EcdsaVerify(CoseKey)
Create an instance of the EcdsaVerify class using the COSE EC public key.
public EcdsaVerify(CoseKey coseKey)
Parameters
Type | Name | Description |
---|---|---|
CoseKey | coseKey | The public key to use to verify. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The coseKey is null. |
ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
EcdsaVerify(ReadOnlyMemory<byte>)
Create an instance of the EcdsaVerify class using the encoded point.
public EcdsaVerify(ReadOnlyMemory<byte> encodedEccPoint)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<byte> | encodedEccPoint | The public key to use to verify. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The coseKey is null. |
ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |
Remarks
This supports the uncompressed encoded point: 04||x-coordinate||y-coordinate
where both coordinates are the curve size (each coordinate is 32 bytes
for P-256, 48 bytes for P-384 and 66 bytes for P-521), prepended with 00 bytes if
necessary.
EcdsaVerify(X509Certificate2)
Create an instance of the EcdsaVerify class using the given certificate.
public EcdsaVerify(X509Certificate2 certificate)
Parameters
Type | Name | Description |
---|---|---|
X509Certificate2 | certificate | The certificate containing the public key to use to verify. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The certificate argument is null. |
ArgumentException | The key is not for a supported algorithm or curve, or is malformed. |