crypto.der_to_pem_ecc_key

crypto

der_to_pem_ecc_key(key_obj) -> pem, err

Convert an ECC key object to SEC 1 PEM format

Accepts a key object table with private (32 bytes) and public (65 bytes) raw binary strings, as returned by ecc_generate_key. Returns a PEM-encoded EC PRIVATE KEY string.

Returns nil and a reason if key_obj is not a table or its private or public field has the wrong type or length.