Ecc.WriteKey Method
Write an internal EC key to an output string.
Syntax
[C#]
public static string WriteKey(
string internalKey,
Ecc.KeyType keyType = Ecc.KeyType.Default
)
[VB]
Public Shared Function WriteKey (
internalKey As String,
Optional keyType As Ecc.KeyType = Ecc.KeyType.Default
) As String
Parameters
- internalKey String
- The private or public EC key in an internal key string
- keyType Ecc.KeyType (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
VB6/C equivalent: ECC_WriteKey
[Contents] [Index]