6162636465666768
if (publicKey != null) signature.initVerify(publicKey); if (privateKey != null) signature.initSign(privateKey); } catch (GeneralSecurityException e) { throw new SSHRuntimeException(e); } }
7576777879808182
@Override public void update(byte[] foo, int off, int len) { try { signature.update(foo, off, len); } catch (SignatureException e) { throw new SSHRuntimeException(e); } }
6768697071727374
@Override public byte[] sign() { try { return signature.sign(); } catch (SignatureException e) { throw new SSHRuntimeException(e); } }
7778798081828384
public boolean verify(byte[] sig) { sig = extractSig(sig); try { return signature.verify(sig); } catch (SignatureException e) { throw new SSHRuntimeException(e); } }
7475767778798081
@Override public void init() { try { md = SecurityUtils.getMessageDigest(algorithm); } catch (GeneralSecurityException e) { throw new SSHRuntimeException(e); } }
6869707172737475767778
public byte[] sign() { byte[] sig; try { sig = signature.sign(); } catch (SignatureException e) { throw new SSHRuntimeException(e); } // sig is in ASN.1 // SEQUENCE::={ r INTEGER, s INTEGER }
130131132133134135136137
sig = tmp; try { return signature.verify(sig); } catch (SignatureException e) { throw new SSHRuntimeException(e); } }