public static byte[] Seal(long gp, byte[]payload) { var op = new OpData(payload, gp); var storage = new MemoryStream(); var writer = new BinaryWriter(storage); op.WriteTo(writer); return storage.ToArray(); }
public void Write() { var o = new OpData(_oneByte,1); var storage = new MemoryStream(); var writer = new BinaryWriter(storage); o.WriteTo(writer); Assert.That(storage.ToArray().Length, Is.EqualTo(8+16+1)); }