How to Encode nodejs ecdh public key as pem

2019-07-10 02:58发布

问题:

Unable to sign a file with nodejs crypto

I am trying to verify a signed document created like in this thread using the method verify.verify() with the ECDH public key. Therefore, i guess, i have to format the raw public key into valid PEM.

How would i do that using the ans1.js and bn.js module?