0

I'm using the library jose to generate a public key. I'm using the function exportSPKI to convert the key object to a PEM-encoded SPKI string format. An example might be

const publicKey = `-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFlHHWfLk0gLBbsLTcuCrbCqoHqmM
YJepMC+Q+Dd6RBmBiA41evUsNMwLeN+PNFqib+xwi9JkJ8qhZkq8Y/IzGg==
-----END PUBLIC KEY-----`

Is it a good idea to write the value of the variable into a .txt file because it's easy to read? Or should I use the .key extension? Or the .pem extension? ( I've never done this before )

baitendbidz
  • 187
  • 3
  • 19

0 Answers0