public MetadataMessage(string data) { byte[] header = { 0x00, 0x00, 0x00, 0x00, 0x20, 0x00 }; byte[] payload = Encoding.ASCII.GetBytes(data); this.data = Bytes.Concatenate(header, payload); }
public void ToBytes(DataBlock block) { block.With((buffer, offset, count) => { Array.Copy(Bytes.Concatenate(hash, xor), 0, buffer, offset, Length); }); }
public void ToBytes(DataBlock block) { byte[] data = Bytes.Concatenate(credentials.PublicKey, credentials.Padding); block.With((buffer, offset, count) => { Array.Copy(data, 0, buffer, offset, Length); }); }
public void ToBytes(DataBlock block) { byte[] data = Bytes.Concatenate(HandshakeCryptoPayload.GetVerification(), Bytes.ToInt32(method), Bytes.Parse("0000")); block.With((buffer, offset, count) => { Array.Copy(data, 0, buffer, offset, Length); }); }