コード例 #1
0
ファイル: treerange.py プロジェクト: madars/VerifiableDB
 def recompute_root_hash(self):
     self.root_hash = setmac.kvhash(self.key3, self.counter, None if not self.root else self.root.mac).encode("hex")
コード例 #2
0
ファイル: treerange.py プロジェクト: madars/VerifiableDB
 def check_root(self):
     computed_hash = setmac.kvhash(self.key3, self.counter, None if not self.root else self.root.mac).encode("hex")
     assert(computed_hash == self.root_hash)