Browse Source

fix up key names

pull/1/head
Jeff Becker 8 years ago
parent
commit
7c1914a466
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
  1. 22
      README.md
  2. 9
      common/key.hpp

22
README.md

@ -22,17 +22,21 @@ Make an destination key with a certain key type @@ -22,17 +22,21 @@ Make an destination key with a certain key type
./keygen privkey.dat <number>
or
| key type | number |
./keygen privkey.dat <key name>
| key name | number |
| -------------------- | ------ |
| DSA SHA1 | 0 |
| ECDSA_SHA256_P256 | 1 |
| ECDSA_SHA384_P384 | 2 |
| ECDSA_SHA512_P521 | 3 |
| RSA_SHA256_2048 | 4 |
| RSA_SHA384_3072 | 5 |
| RSA_SHA512_4096 | 6 |
| EDDSA_SHA512_ED25519 | 7 |
| DSA-SHA1 | 0 |
| ECDSA-SHA256-P256 | 1 |
| ECDSA-SHA384-P384 | 2 |
| ECDSA-SHA512-P521 | 3 |
| RSA-SHA256-2048 | 4 |
| RSA-SHA384-3072 | 5 |
| RSA-SHA512-4096 | 6 |
| EDDSA-SHA512-ED25519 | 7 |

9
common/key.hpp

@ -55,14 +55,11 @@ uint16_t NameToSigType(const std::string & keyname) @@ -55,14 +55,11 @@ uint16_t NameToSigType(const std::string & keyname)
if(name.find("P384") != npos) return i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA384_P384;
if(name.find("RSA2048") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048;
if(name.find("RSA-2048") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048;
if(name.find("RSA-SHA265") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048;
if(name.find("RSA3072") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072;
if(name.find("RSA-3072") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072;
if(name.find("RSA-SHA384") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072;
if(name.find("RSA4096") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096;
if(name.find("RSA-4096") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096;
if(name.find("RSA-SHA512") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096;
if(name.find("ED25519") != npos) return i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;

Loading…
Cancel
Save