diff options
author | Tianjie Xu <xunchang@google.com> | 2019-12-19 18:59:24 -0800 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2019-12-19 18:59:24 -0800 |
commit | 23f45d228ce51a00d8c37868daf28947c25dd4ab (patch) | |
tree | c32a62460edd63d90ddab1943f8ffe370afd5205 /libfec | |
parent | 72f8dd3e98083d3db3da295d59d14445bb4b3d7e (diff) | |
download | extras-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.cpp | 2 |
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; } |