Click or drag to resize

EccReadKeyByCurve Method

Read an EC key from its hexadecimal representation with options for safe curves.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntax
public static string ReadKeyByCurve(
	string hexKey,
	EccCurveName curveName,
	EccKeyType keyType = EccKeyType.Default
)

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

String
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