summaryrefslogtreecommitdiff
path: root/libfec
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-12-19 18:59:24 -0800
committerTianjie Xu <xunchang@google.com>2019-12-19 18:59:24 -0800
commit23f45d228ce51a00d8c37868daf28947c25dd4ab (patch)
treec32a62460edd63d90ddab1943f8ffe370afd5205 /libfec
parent72f8dd3e98083d3db3da295d59d14445bb4b3d7e (diff)
downloadextras-23f45d228ce51a00d8c37868daf28947c25dd4ab.tar.gz
Don't padd the digest during hash computation
There's no need to do that. Also check_block_hash() only allocates a buffer of digest_length_. Bug: 144388532 Test: unit tests pass Change-Id: Iec3209d260b51cb41905cc84ae86572bcb1cc130
Diffstat (limited to 'libfec')
-rw-r--r--libfec/fec_verity.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/libfec/fec_verity.cpp b/libfec/fec_verity.cpp
index 9ac23777..0290c1ff 100644
--- a/libfec/fec_verity.cpp
+++ b/libfec/fec_verity.cpp
@@ -135,8 +135,6 @@ int hashtree_info::get_hash(const uint8_t *block, uint8_t *hash) {
EVP_MD_CTX_free(mdctx);
check(hash_size == digest_length_)
-
- std::fill(hash + hash_size, hash + padded_digest_length_, 0);
return 0;
}