mirror of
https://github.com/PurpleI2P/i2pd-tools.git
synced 2025-01-22 13:27:17 +01:00
fix up key names
This commit is contained in:
parent
bb9dda6ba9
commit
7c1914a466
22
README.md
22
README.md
|
@ -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 |
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue