This commit is contained in:
yhirose
2026-06-03 22:24:52 -04:00
parent 44215e23e9
commit 4465e81b9f
+1 -1
View File
@@ -4629,7 +4629,7 @@ inline std::string sha1(const std::string &input) {
// Pre-processing: adding padding bits
std::string msg = input;
uint64_t original_bit_len = static_cast<uint64_t>(msg.size()) * 8;
msg.push_back(static_cast<char>(0x80));
msg.push_back(static_cast<char>(0x80u));
while (msg.size() % 64 != 56) {
msg.push_back(0);
}