PointyCastle / pointycastle

Moved into the Bouncy Castle project: https://github.com/bcgit/pc-dart
MIT License
270 stars 76 forks source link

convert ECPrivateKey/ECPublicKey to PEM #213

Open spd-heshuip opened 4 years ago

spd-heshuip commented 4 years ago

How convert ECPrivateKey/ECPublicKey to PEM string?

richardheap commented 4 years ago

Pointycastle lacks the ASN.1 encode/decode functions to do this. Typically, you'd create your keys elsewhere (e.g. with openssl) and read from PEM into pointycastle. Check out the rsa_pkcs package in pub.dev. You might need to extend it to support EC keys.