summaryrefslogtreecommitdiff
path: root/scripts/update_payload/applier.py
diff options
context:
space:
mode:
authorGilad Arnold <garnold@chromium.org>2013-05-04 00:24:58 -0700
committerChromeBot <chrome-bot@google.com>2013-05-07 00:03:15 -0700
commit9640537ac1b6abfae866424a11e6869228fb7cac (patch)
tree8223bad816120a0f9a9a2182e9aefd1b8deca776 /scripts/update_payload/applier.py
parent382df5ce2f4b67bf0998b01c6fedcdb5c35ebef9 (diff)
paycheck: use base64 encoding for SHA256 hashes throughout
Turns out we were using base64 when adding SHA256 data to a payload report, but intermittently using hex encoding in error messages. This is now fixed. BUG=None TEST=No mention of hex encoding in the code TEST=gpylinted correctly TEST=Passes unit tests Change-Id: Id2dc2fcd154d4647cc1a076579dde7a789c09e40 Reviewed-on: https://gerrit.chromium.org/gerrit/50104 Reviewed-by: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: David James <davidjames@chromium.org>
Diffstat (limited to 'scripts/update_payload/applier.py')
-rw-r--r--scripts/update_payload/applier.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/update_payload/applier.py b/scripts/update_payload/applier.py
index 3b7b1a67..cd9fd06b 100644
--- a/scripts/update_payload/applier.py
+++ b/scripts/update_payload/applier.py
@@ -62,8 +62,8 @@ def _VerifySha256(file_obj, expected_hash, name, length=-1):
actual_hash = hasher.digest()
if actual_hash != expected_hash:
raise PayloadError('%s hash (%s) not as expected (%s)' %
- (name, actual_hash.encode('hex'),
- expected_hash.encode('hex')))
+ (name, common.FormatSha256(actual_hash),
+ common.FormatSha256(expected_hash)))
def _ReadExtents(file_obj, extents, block_size, max_length=-1):