Save an internal EC key string to a key file.
Public Function eccSaveKey ( _ szOutputFile As String, _ szKeyStr As String, _ Optional nOptions As Long = 0 _ ) As Long
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_FORMAT_PEM to save the key file in PEM form (default is binary DER-encoded format). PKI_KEY_LEGACY to save a safe key in "legacy" PKCS#8 v1 format (default is v2 OneAsymmetricKey).
PKI_KEY_TYPE_PKCS8
option to save in PKCS#8 PrivateKeyInfo format [RFC5208].
Safe curve private keys (X25519, Ed25519, X448 and Ed448) are always saved in PKCS#8 v2
OneAsymmetricKey format including the public key [RFC5958]. Add the option PKI_KEY_LEGACY
to save in older PKCS#8 v1 PrivateKeyInfo format [RFC5208] excluding the public key.
To save a private key in encrypted form, use eccSaveEncKey.