Ecc.ReadKeyByCurve Method
Read an EC key from its hexadecimal representation with options for safe curves.
Syntax
[C#]
public static string ReadKeyByCurve(
string hexKey,
Ecc.CurveName curveName,
Ecc.KeyType keyType
)
[VB.NET]
Public Shared Function ReadKeyByCurve ( _
hexKey As String, _
curveName As Ecc.CurveName, _
keyType As Ecc.KeyType _
) As String
Parameters
- hexKey
- hexadecimal representation of the key, private or public
- curveName
- Type: Ecc.CurveName
name of the elliptic curve
- keyType
- Type: Ecc.KeyType
(optional) Specify PrivateKey or PublicKey (safe curves Ed25519 and X25519 only, otherwise ignored)
Return Value
The key in ephemeral "internal" representation, or the empty string on error
Remarks
The safe curves Ed25519 and X25519 have the same length for both private and public keys, so, for these safe curves, you must specify whether the key value represents a public or a private key.
See Also
VB6/C equivalent: ECC_ReadKeyByCurve
[Contents] [Index]