Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef EXTENSIONS_BROWSER_CONTENT_HASH_TREE_H_ | |
| 6 #define EXTENSIONS_BROWSER_CONTENT_HASH_TREE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 namespace extensions { | |
| 12 | |
| 13 // This takes a list of sha256 hashes, considers them to be leaf nodes of a | |
| 14 // hash tree (aka Merkle tree), and computes the hash of the root node of the | |
| 15 // tree using a branching factor of |block_size| / sizeof(sha256hash). The | |
| 16 // block size should be a multiple of sizeof(sha256hash). | |
|
Marijn Kruisselbrink
2014/05/12 17:53:45
From the code here it isn't entirely clear why you
Marijn Kruisselbrink
2014/05/12 17:53:45
You should probably explicitly document how this m
asargent_no_longer_on_chrome
2014/05/12 21:58:58
Added documentation about numbers of nodes that ar
asargent_no_longer_on_chrome
2014/05/12 21:58:58
I refactored this code out from being inline in an
| |
| 17 std::string ComputeTreeHashRoot(const std::vector<std::string>& leaf_hashes, | |
| 18 int block_size); | |
| 19 | |
| 20 } // namespace extensions | |
| 21 | |
| 22 #endif // EXTENSIONS_BROWSER_CONTENT_HASH_TREE_H_ | |
| OLD | NEW |