Пример #1
0
  protected byte[] enginesign() throws signatureexception {
    try {
      byte[] sig = signer.generatesignature();

      return sig;
    } catch (exception e) {
      throw new signatureexception(e.tostring());
    }
  }
Пример #2
0
  protected boolean engineverify(byte[] sigbytes) throws signatureexception {
    boolean yes = signer.verifysignature(sigbytes);

    return yes;
  }
Пример #3
0
 protected void engineupdate(byte[] b, int off, int len) throws signatureexception {
   signer.update(b, off, len);
 }
Пример #4
0
 protected void engineupdate(byte b) throws signatureexception {
   signer.update(b);
 }
Пример #5
0
  protected void engineinitsign(privatekey privatekey) throws invalidkeyexception {
    cipherparameters param = rsautil.generateprivatekeyparameter((rsaprivatekey) privatekey);

    signer.init(true, param);
  }
Пример #6
0
  protected void engineinitverify(publickey publickey) throws invalidkeyexception {
    cipherparameters param = rsautil.generatepublickeyparameter((rsapublickey) publickey);

    signer.init(false, param);
  }