diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/pk_pad/hash_id/hash_id.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/pk_pad/hash_id/hash_id.cpp b/src/lib/pk_pad/hash_id/hash_id.cpp index 70b7470c4..71a3dbe22 100644 --- a/src/lib/pk_pad/hash_id/hash_id.cpp +++ b/src/lib/pk_pad/hash_id/hash_id.cpp @@ -67,7 +67,7 @@ std::vector<uint8_t> pkcs_hash_id(const std::string& name) return std::vector<uint8_t>(RIPEMD_160_PKCS_ID, RIPEMD_160_PKCS_ID + sizeof(RIPEMD_160_PKCS_ID)); - if(name == "SHA-160") + if(name == "SHA-160" || name == "SHA-1" || name == "SHA1") return std::vector<uint8_t>(SHA_160_PKCS_ID, SHA_160_PKCS_ID + sizeof(SHA_160_PKCS_ID)); @@ -103,7 +103,8 @@ std::vector<uint8_t> pkcs_hash_id(const std::string& name) */ uint8_t ieee1363_hash_id(const std::string& name) { - if(name == "SHA-160") return 0x33; + if(name == "SHA-160" || name == "SHA-1" || name == "SHA1") + return 0x33; if(name == "SHA-224") return 0x38; if(name == "SHA-256") return 0x34; |