protected byte[] enginesign() throws signatureexception { try { byte[] sig = signer.generatesignature(); return sig; } catch (exception e) { throw new signatureexception(e.tostring()); } }
protected boolean engineverify(byte[] sigbytes) throws signatureexception { boolean yes = signer.verifysignature(sigbytes); return yes; }
protected void engineupdate(byte[] b, int off, int len) throws signatureexception { signer.update(b, off, len); }
protected void engineupdate(byte b) throws signatureexception { signer.update(b); }
protected void engineinitsign(privatekey privatekey) throws invalidkeyexception { cipherparameters param = rsautil.generateprivatekeyparameter((rsaprivatekey) privatekey); signer.init(true, param); }
protected void engineinitverify(publickey publickey) throws invalidkeyexception { cipherparameters param = rsautil.generatepublickeyparameter((rsapublickey) publickey); signer.init(false, param); }