Read an EC key from its hexadecimal representation with options for safe curves.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static string ReadKeyByCurve(
string hexKey,
EccCurveName curveName,
EccKeyType keyType = EccKeyType.Default
)
Public Shared Function ReadKeyByCurve (
hexKey As String,
curveName As EccCurveName,
Optional keyType As EccKeyType = EccKeyType.Default
) As String
Parameters
- hexKey String
- hexadecimal representation of the key, private or public
- curveName EccCurveName
- name of the elliptic curve
- keyType EccKeyType (Optional)
- (optional) Specify PrivateKey or PublicKey
(safe curves Ed25519 and X25519 only, otherwise ignored)
Return Value
StringThe key in ephemeral "internal" representation, or the empty string on error
RemarksThe 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