Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: extensions/browser/content_hash_tree.h

Issue 274243004: Add code to compute the root hash for a hash tree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed bugs and added tests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698