diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-18 22:04:57 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-18 22:04:57 +0000 |
commit | e6770bc2fd090ea60751a66492912b953e2979f8 (patch) | |
tree | b0eb8f2773937fc2168d0b89afa4091809cf57a2 | |
parent | 413fed474e7fbdc10128482284700f0fad41e31a (diff) |
Fix an off by one error in enc_sha2.
-rw-r--r-- | modules/encryption/enc_sha2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/encryption/enc_sha2.cpp b/modules/encryption/enc_sha2.cpp index 4a9f12b09..d2ad99b62 100644 --- a/modules/encryption/enc_sha2.cpp +++ b/modules/encryption/enc_sha2.cpp @@ -160,7 +160,7 @@ public: if (!is_hmac && hash_method.compare(0, 4, "raw-", 4)) return; // Not a SHA-2 password. - auto provider = GetAlgorithm(hash_method.substr(5)); + auto provider = GetAlgorithm(hash_method.substr(is_hmac ? 5 : 4)); if (!provider) return; // Not a hash for this module. |