-
SummaryHello, I am always obtaining this error : Just replaced str2ab function by 'new TextEncoder().encode(privateKey)' because I had a format issue using it. I tried with my key, and keys from given examples, but none is working... Nextjs : v14 with Typescript My code :
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Honestly, I am not the biggest fan of going around installing packages, but |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer @icyJoseph ! Related issue : panva/jose#345 Old commands :
|
Beta Was this translation helpful? Give feedback.
Thank you for your answer @icyJoseph !
I tried jose and I have encountered same problem... but I found the the solution
In fact I was using basic ssh-keygen / openssl commands to generate a public / private key pair, but it was in format PKCS#1 by default. Jose and crypto libraries need more recent format, like PKCS#8 (private key) and SPKI (public key)
Related issue : panva/jose#345
Old commands :