private static BigInteger checkAndReturn(String which,
                                             BigInteger expected,
                                             String asbigintcs)
    {
        BigInteger other =
                BigIntStringChecksum.fromString(asbigintcs).asBigInteger();

        if (expected.equals(other))
        {
            return expected;
        }
        else
        {
            throw new SecretShareException(which + " failure");
        }
    }
private static BigInteger checkAndReturn ( String which , BigInteger expected , String asbigintcs ) { BigInteger other = BigIntStringChecksum . fromString ( asbigintcs ) . asBigInteger ( ) ; if ( expected . equals ( other ) ) { return expected ; } else { throw new SecretShareException ( which + " failure" ) ; } }
Guard against accidental changes to the strings.

@param which caller
@param expected value as biginteger
@param asbigintcs value as big-integer-checksum string
@return expected or throw exception
@throws SecretShareException if expected does not match asbigintcs