public boolean
verify(byte [] signature, boolean truncation_ok) {
	byte [] expected = sign();
	if (truncation_ok && signature.length < expected.length) {
		byte [] truncated = new byte[signature.length];
		System.arraycopy(expected, 0, truncated, 0, truncated.length);
		expected = truncated;
	}
	return Arrays.equals(signature, expected);
}
public boolean verify ( byte [ ] signature , boolean truncation_ok ) { byte [ ] expected = sign ( ) ; if ( truncation_ok && signature . length < expected . length ) { byte [ ] truncated = new byte [ signature . length ] ; System . arraycopy ( expected , 0 , truncated , 0 , truncated . length ) ; expected = truncated ; } return Arrays . equals ( signature , expected ) ; }
Verifies the data (computes the secure hash and compares it to the input)
@param signature The signature to compare against
@param truncation_ok If true, the signature may be truncated; only the
number of bytes in the provided signature are compared.
@return true if the signature matches, false otherwise