public boolean verify(byte[] data, byte[] sign) {
		lock.lock();
		try {
			signature.initVerify(this.publicKey);
			signature.update(data);
			return signature.verify(sign);
		} catch (Exception e) {
			throw new CryptoException(e);
		} finally {
			lock.unlock();
		}
	}
public boolean verify ( byte [ ] data , byte [ ] sign ) { lock . lock ( ) ; try { signature . initVerify ( this . publicKey ) ; signature . update ( data ) ; return signature . verify ( sign ) ; } catch ( Exception e ) { throw new CryptoException ( e ) ; } finally { lock . unlock ( ) ; } }
用公钥检验数字签名的合法性

@param data 数据
@param sign 签名
@return 是否验证通过