예제 #1
0
 def _block_callback(
     self,
     outbuf: binwrapper.BinWrapper,
     data: bytes,
 ) -> None:
     outbuf.write_bytes(b'D')
     outbuf.write_bytes(hashlib.sha1(data).digest())
     outbuf.write_len32_prefixed_bytes(data)
예제 #2
0
 def dump(self, val: bytes, buffer: binwrapper.BinWrapper) -> None:
     assert isinstance(val, bytes) and len(val) == 16
     buffer.write_bytes(val)