185186187188189190191192193194195
ByteArrayWriter data = new ByteArrayWriter(); baw.writeString(type); baw.write(iv); data.writeInt(cookie); data.writeBinaryString(keyblob); // Encrypt and write baw.writeBinaryString(cipher.doFinal(data.toByteArray())); return formatKey(baw.toByteArray());
183184185186187188189190191192193
sig.initSign(prvKey); sig.update(data); ByteArrayWriter baw = new ByteArrayWriter(); baw.writeString(getAlgorithmName()); baw.writeBinaryString(sig.sign()); return baw.toByteArray(); } catch (Exception e) { return null; }
232233234235236237238239240241242
log.debug("SSH signature is " + str); } ByteArrayWriter baw = new ByteArrayWriter(); baw.writeString(getAlgorithmName()); baw.writeBinaryString(decoded); return baw.toByteArray(); } catch (Exception e) { throw new InvalidSignatureException(e); }