Write an internal EC key to an output string.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.2.0.37107 (23.2.0.0)
Syntaxpublic static string WriteKey(
string internalKey,
EccKeyType keyType = EccKeyType.Default
)
Public Shared Function WriteKey (
internalKey As String,
Optional keyType As EccKeyType = EccKeyType.Default
) As String
Parameters
- internalKey String
- The private or public EC key in an internal key string
- keyType EccKeyType (Optional)
- Key structure options
Return Value
StringString containing the key in textual PEM format or the empty string if error.
RemarksThis 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