def _calculate_u(self) -> int:
    if (self.A is None):
        raise RuntimeError("Client's public key is missing")
    if (self.B is None):
        raise RuntimeError("Server's public key is missing")
    hash_instance = self.h()
    A_b = Srp.to_byte_array(self.A)
    B_b = Srp.to_byte_array(self.B)
    hash_instance.update(A_b)
    hash_instance.update(B_b)
    u = int.from_bytes(hash_instance.digest(), 'big')
    return u
def _calculate_u(self) -> int:
    if (self.A is None):
        raise RuntimeError("Client's public key is missing")
    if (self.B is None):
        raise RuntimeError("Server's public key is missing")
    hash_instance = self.h()
    A_b = Srp.to_byte_array(self.A)
    B_b = Srp.to_byte_array(self.B)
    hash_instance.update(A_b)
    hash_instance.update(B_b)
    u = int.from_bytes(hash_instance.digest(), 'big')
    return u