libp2p / js-peer-id

peer-id implementation in JavaScript. Deprecated; use https://github.com/libp2p/js-libp2p-peer-id instead.
https://github.com/libp2p/js-libp2p-peer-id
MIT License
81 stars 44 forks source link

feat(cli): add support for specifying type and size #122

Closed jacobheun closed 4 years ago

jacobheun commented 4 years ago

This adds the ability to specify the key type and size when using the cli.

$ peer-id --type ed25519
{
  "id": "12D3Koo...",
  "privKey": "CAES...",
  "pubKey": "CAE..."
}

$ peer-id --type rsa --bits 4096
{
  "id": "Qm...",
  "privKey": "CAA...",
  "pubKey": "CAA..."
}