'Hash data.'

def update(self, data):

    view = memoryview(data)
    bs = self.block_size
    if self._buf:
        need = (bs - len(self._buf))
        if (len(view) < need):
            self._buf += view.tobytes()
            return
        self._add_block((self._buf + view[:need].tobytes()))
        view = view[need:]
    while (len(view) >= bs):
        self._add_block(view[:bs])
        view = view[bs:]
    self._buf = view.tobytes()
