Click or drag to resize

EccWriteKey Method

Write an internal EC key to an output string.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.2.0.37107 (23.2.0.0)
Syntax
public static string WriteKey(
	string internalKey,
	EccKeyType keyType = EccKeyType.Default
)

Parameters

internalKey  String
The private or public EC key in an internal key string
keyType  EccKeyType  (Optional)
Key structure options

Return Value

String
String containing the key in textual PEM format or the empty string if error.
Remarks
This works the same as Ecc.SaveKey except it outputs to a PEM string instead of a file. Use this unencrypted PEM string as input for any ECC, signature, X.509 or ASN.1 function expecting a public or private ECC key. Exercise caution due to the lack of encryption and prefer the internal key string format for private keys to ensure better security.
See Also