示例#1
0
 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
 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)