def METHOD_NAME(self):
    result_data = (c_ubyte * 32)()
    result_length = c_int()
    ret = self._driver.SDF_HashFinal(self._session, result_data, pointer(result_length))
    if ret != 0:
        raise PiicoError("hash final failed", ret)
    return bytes(result_data[:result_length.value])