def are_checksums_equal(checksum_a_pyxb, checksum_b_pyxb):
    """Determine if checksums are equal.

    Args:
       checksum_a_pyxb, checksum_b_pyxb: PyXB Checksum objects to compare.

    Returns:
      bool
        - **True**: The checksums contain the same hexadecimal values calculated with
          the same algorithm. Identical checksums guarantee (for all practical
          purposes) that the checksums were calculated from the same sequence of bytes.
        - **False**: The checksums were calculated with the same algorithm but the
          hexadecimal values are different.

    Raises:
      ValueError
        The checksums were calculated with different algorithms, hence cannot be
        compared.

    """
    if checksum_a_pyxb.algorithm != checksum_b_pyxb.algorithm:
        raise ValueError(
            'Cannot compare checksums calculated with different algorithms. '
            'a="{}" b="{}"'.format(checksum_a_pyxb.algorithm, checksum_b_pyxb.algorithm)
        )
    return checksum_a_pyxb.value().lower() == checksum_b_pyxb.value().lower()
def are_checksums_equal ( checksum_a_pyxb , checksum_b_pyxb ) : if checksum_a_pyxb . algorithm != checksum_b_pyxb . algorithm : raise ValueError ( 'Cannot compare checksums calculated with different algorithms. ' 'a="{}" b="{}"' . format ( checksum_a_pyxb . algorithm , checksum_b_pyxb . algorithm ) ) return checksum_a_pyxb . value ( ) . lower ( ) == checksum_b_pyxb . value ( ) . lower ( )
Determine if checksums are equal.

    Args:
       checksum_a_pyxb, checksum_b_pyxb: PyXB Checksum objects to compare.

    Returns:
      bool
        - **True**: The checksums contain the same hexadecimal values calculated with
          the same algorithm. Identical checksums guarantee (for all practical
          purposes) that the checksums were calculated from the same sequence of bytes.
        - **False**: The checksums were calculated with the same algorithm but the
          hexadecimal values are different.

    Raises:
      ValueError
        The checksums were calculated with different algorithms, hence cannot be
        compared.