diff options
Diffstat (limited to '')
-rw-r--r-- | otautil/include/otautil/print_sha1.h (renamed from print_sha1.h) | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/print_sha1.h b/otautil/include/otautil/print_sha1.h index d0c18b355..03a8d292a 100644 --- a/print_sha1.h +++ b/otautil/include/otautil/print_sha1.h @@ -23,25 +23,25 @@ #include <openssl/sha.h> static std::string print_sha1(const uint8_t* sha1, size_t len) { - const char* hex = "0123456789abcdef"; - std::string result = ""; - for (size_t i = 0; i < len; ++i) { - result.push_back(hex[(sha1[i]>>4) & 0xf]); - result.push_back(hex[sha1[i] & 0xf]); - } - return result; + const char* hex = "0123456789abcdef"; + std::string result = ""; + for (size_t i = 0; i < len; ++i) { + result.push_back(hex[(sha1[i] >> 4) & 0xf]); + result.push_back(hex[sha1[i] & 0xf]); + } + return result; } [[maybe_unused]] static std::string print_sha1(const uint8_t sha1[SHA_DIGEST_LENGTH]) { - return print_sha1(sha1, SHA_DIGEST_LENGTH); + return print_sha1(sha1, SHA_DIGEST_LENGTH); } [[maybe_unused]] static std::string short_sha1(const uint8_t sha1[SHA_DIGEST_LENGTH]) { - return print_sha1(sha1, 4); + return print_sha1(sha1, 4); } [[maybe_unused]] static std::string print_hex(const uint8_t* bytes, size_t len) { - return print_sha1(bytes, len); + return print_sha1(bytes, len); } #endif // RECOVERY_PRINT_SHA1_H |