public boolean verify(byte[] message, byte[] signature) {
		try {
			// this way signatureInstance should be thread safe
			final Signature signatureInstance = ((provider == null) || (provider.length() == 0)) ? Signature
					.getInstance(algorithm) : Signature.getInstance(algorithm, provider);
			signatureInstance.initVerify(publicKey);
			signatureInstance.update(message);
			return signatureInstance.verify(signature);
		} catch (java.security.SignatureException e) {
			return false;
		} catch (Exception e) {
			throw new SignatureException("error verifying signature", e);
		}
	}
public boolean verify ( byte [ ] message , byte [ ] signature ) { try { final Signature signatureInstance = ( ( provider == null ) || ( provider . length ( ) == 0 ) ) ? Signature . getInstance ( algorithm ) : Signature . getInstance ( algorithm , provider ) ; signatureInstance . initVerify ( publicKey ) ; signatureInstance . update ( message ) ; return signatureInstance . verify ( signature ) ; } catch ( java . security . SignatureException e ) { return false ; } catch ( Exception e ) { throw new SignatureException ( "error verifying signature" , e ) ; } }
Verifies the authenticity of a message using a digital signature.

@param message the original message to verify
@param signature the digital signature
@return true if the original message is verified by the digital signature