summaryrefslogtreecommitdiffstats
path: root/print_sha1.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-04-23 02:08:10 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-04-23 02:08:10 +0200
commite93c43fc6678dc5f923aedc6594d058f67b3c3d0 (patch)
tree87ac1837109158992b884e8aa2ffe9ec1b583740 /print_sha1.h
parentMerge "Go back to the old ear-wiggling Android animation. am: 692941be79 am: 87b0654f00" into nyc-mr1-dev-plus-aosp (diff)
parentMerge "recovery: Dump the signature in the zip package." into nyc-dev am: 34ca089 (diff)
downloadandroid_bootable_recovery-e93c43fc6678dc5f923aedc6594d058f67b3c3d0.tar
android_bootable_recovery-e93c43fc6678dc5f923aedc6594d058f67b3c3d0.tar.gz
android_bootable_recovery-e93c43fc6678dc5f923aedc6594d058f67b3c3d0.tar.bz2
android_bootable_recovery-e93c43fc6678dc5f923aedc6594d058f67b3c3d0.tar.lz
android_bootable_recovery-e93c43fc6678dc5f923aedc6594d058f67b3c3d0.tar.xz
android_bootable_recovery-e93c43fc6678dc5f923aedc6594d058f67b3c3d0.tar.zst
android_bootable_recovery-e93c43fc6678dc5f923aedc6594d058f67b3c3d0.zip
Diffstat (limited to 'print_sha1.h')
-rw-r--r--print_sha1.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/print_sha1.h b/print_sha1.h
index fa3d7e009..c7c1f3651 100644
--- a/print_sha1.h
+++ b/print_sha1.h
@@ -22,7 +22,7 @@
#include "openssl/sha.h"
-static std::string print_sha1(const uint8_t sha1[SHA_DIGEST_LENGTH], size_t len) {
+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) {
@@ -40,4 +40,8 @@ static std::string short_sha1(const uint8_t sha1[SHA_DIGEST_LENGTH]) {
return print_sha1(sha1, 4);
}
+static std::string print_hex(const uint8_t* bytes, size_t len) {
+ return print_sha1(bytes, len);
+}
+
#endif // RECOVERY_PRINT_SHA1_H