/// <exception cref="System.IO.IOException"></exception> private void Digest(TemporaryBuffer.Heap buf) { MessageDigest md = Constants.NewMessageDigest(); md.Update(buf.ToByteArray()); buf.Write(md.Digest()); }
/// <exception cref="System.IO.IOException"></exception> private void OpenPack(TemporaryBuffer.Heap buf) { if (inserter == null) { inserter = src.NewObjectInserter(); } byte[] raw = buf.ToByteArray(); PackParser p = inserter.NewPackParser(new ByteArrayInputStream(raw)); p.SetAllowThin(true); p.Parse(PM); }
/// <exception cref="System.IO.IOException"></exception> private static PacketLineIn AsPacketLineIn(TemporaryBuffer.Heap buf) { return new PacketLineIn(new ByteArrayInputStream(buf.ToByteArray())); }
/// <exception cref="System.IO.IOException"></exception> private void Receive(ReceivePack rp, TemporaryBuffer.Heap inBuf, TemporaryBuffer.Heap outBuf) { rp.Receive(new ByteArrayInputStream(inBuf.ToByteArray()), outBuf, null); }