CryptoSys PKI Pro Manual

eccWriteKey

Write an internal EC key to an output string.

Syntax

[VBA]
Public Function eccWriteKey ( _
    szKeyString As String, _
    Optional nOptions As Long = 0 _
) As String

Parameters

szKeyString
Key string (public or private) in internal format.
nOptions
Choose one of
PKI_DEFAULT (0) to save the key in the default format.
PKI_KEY_TYPE_PKCS8 to save a NIST/SEC curve private key in PKCS#8 format.
and optionally add any of
PKI_KEY_LEGACY to save a safe key in "legacy" PKCS#8 v1 format (default is v2 OneAsymmetricKey).
PKI_KEY_COMPRESS to save an ECDSA public key in compressed format (default is uncompressed)

Return Value

String: String containing the result or an empty string if error.

Remarks

The output is always in textual PEM format. See eccSaveKey for details of key format. 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.
[PREV: eccSaveKey...]   [Contents]   [Index]   
   [NEXT: errFormatErrorMessage...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-06T00:43:03Z.