public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(perm_auth_key_id); bw.Write(nonce); bw.Write(expires_at); BytesUtil.Serialize(encrypted_message, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(dc_id); BytesUtil.Serialize(file_token, bw); BytesUtil.Serialize(encryption_key, bw); BytesUtil.Serialize(encryption_iv, bw); }
private byte[] GetAndLogHeartBeat() { var hbMsg = MessageBuilder.BuildHeartBeat(mac); var hbHex = BytesUtil.BytesToHexWithSeparator(hbMsg, "-"); Console.WriteLine($"Time: {DateTime.Now} Mac: {mac} => 发送心跳消息:{hbHex}"); return(hbMsg); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(this.Constructor); ObjectUtils.SerializeObject(this.Peer, bw); BytesUtil.Serialize(this.GA, bw); bw.Write(this.KeyFingerprint); ObjectUtils.SerializeObject(this.Protocol, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); ObjectUtils.SerializeObject(user_id, bw); bw.Write(random_id); BytesUtil.Serialize(g_a_hash, bw); ObjectUtils.SerializeObject(protocol, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(this.Constructor); ObjectUtils.SerializeObject(this.Peer, bw); bw.Write(this.RandomId); BytesUtil.Serialize(this.Data, bw); ObjectUtils.SerializeObject(this.File, bw); }
public override void DeserializeBody(BinaryReader br) { CurrentSalt = BytesUtil.Deserialize(br); NewSalt = BytesUtil.Deserialize(br); Hint = StringUtil.Deserialize(br); HasRecovery = BoolUtil.Deserialize(br); EmailUnconfirmedPattern = StringUtil.Deserialize(br); }
public override void DeserializeBody(BinaryReader br) { RandomId = br.ReadInt64(); ChatId = br.ReadInt32(); Date = br.ReadInt32(); Bytes = BytesUtil.Deserialize(br); File = (TlAbsEncryptedFile)ObjectUtils.DeserializeObject(br); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(this.Constructor); bw.Write(this.G); BytesUtil.Serialize(this.P, bw); bw.Write(this.Version); BytesUtil.Serialize(this.Random, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(file_id); bw.Write(file_part); bw.Write(file_total_parts); BytesUtil.Serialize(bytes, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(RandomId); bw.Write(ChatId); bw.Write(Date); BytesUtil.Serialize(Bytes, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(PermAuthKeyId); bw.Write(Nonce); bw.Write(ExpiresAt); BytesUtil.Serialize(EncryptedMessage, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(DcId); BytesUtil.Serialize(FileToken, bw); BytesUtil.Serialize(EncryptionKey, bw); BytesUtil.Serialize(EncryptionIv, bw); }
// TODO: to be used in a repair form... //private void WriteAllBins() { // int p = 0; // for (int i = 0; i < 128; ++i, p += 8) { // long val = freeBinList[i]; // BytesUtil.WriteInt8(val, binArea, p); // } // Write(BinAreaOffset, binArea, 0, 128 * 8); //} private void WriteBinIndex(int index) { int p = index * 8; long val = freeBinList[index]; BytesUtil.WriteInt8(val, binArea, p); Write(BinAreaOffset + p, binArea, p, 8); }
public override void DeserializeBody(BinaryReader br) { current_salt = BytesUtil.Deserialize(br); new_salt = BytesUtil.Deserialize(br); hint = StringUtil.Deserialize(br); has_recovery = BoolUtil.Deserialize(br); email_unconfirmed_pattern = StringUtil.Deserialize(br); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(this.Constructor); ObjectUtils.SerializeObject(this.UserId, bw); bw.Write(this.RandomId); BytesUtil.Serialize(this.GAHash, bw); ObjectUtils.SerializeObject(this.Protocol, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(G); BytesUtil.Serialize(P, bw); bw.Write(Version); BytesUtil.Serialize(Random, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); ObjectUtils.SerializeObject(peer, bw); bw.Write(random_id); BytesUtil.Serialize(data, bw); ObjectUtils.SerializeObject(file, bw); }
public override void DeserializeBody(BinaryReader br) { DcId = br.ReadInt32(); FileToken = BytesUtil.Deserialize(br); EncryptionKey = BytesUtil.Deserialize(br); EncryptionIv = BytesUtil.Deserialize(br); CdnFileHashes = (TLVector <TLCdnFileHash>)ObjectUtils.DeserializeVector <TLCdnFileHash>(br); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(FileId); bw.Write(FilePart); bw.Write(FileTotalParts); BytesUtil.Serialize(Bytes, bw); }
public override void DeserializeBody(BinaryReader br) { Size = br.ReadInt32(); MimeType = StringUtil.Deserialize(br); FileType = (Storage.TLAbsFileType)ObjectUtils.DeserializeObject(br); Mtime = br.ReadInt32(); Bytes = BytesUtil.Deserialize(br); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(Flags); ObjectUtils.SerializeObject(UserId, bw); bw.Write(RandomId); BytesUtil.Serialize(GAHash, bw); ObjectUtils.SerializeObject(Protocol, bw); }
public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); Video = (Flags & 1) != 0; UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); RandomId = br.ReadInt32(); GAHash = BytesUtil.Deserialize(br); Protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); bw.Write(Size); StringUtil.Serialize(MimeType, bw); ObjectUtils.SerializeObject(FileType, bw); bw.Write(Mtime); BytesUtil.Serialize(Bytes, bw); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); BytesUtil.Serialize(CurrentSalt, bw); BytesUtil.Serialize(NewSalt, bw); StringUtil.Serialize(Hint, bw); BoolUtil.Serialize(HasRecovery, bw); StringUtil.Serialize(EmailUnconfirmedPattern, bw); }
public static GREHeader FromBytes(byte[] arr, int startIndex = 0) { var head = BytesUtil.fromBytes <GREHeader>(arr, startIndex); head.flags_ver = (UInt16)IPAddress.NetworkToHostOrder((Int16)head.flags_ver); head.protocol = (UInt16)IPAddress.NetworkToHostOrder((Int16)head.protocol); return(head); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); StringUtil.Serialize(Type, bw); ObjectUtils.SerializeObject(Location, bw); bw.Write(W); bw.Write(H); BytesUtil.Serialize(Bytes, bw); }
private void btn_send_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(memoEdit2.Text)) { MessageBox.Show("请输入发送内容"); return; } smanager.Send(BytesUtil.ToHexArray(memoEdit2.Text)); }
private void SendRealMsg2Server(IChannelHandlerContext context, string msg) { Logger.Info($"发送消息到Server, msg:{msg}"); msg = msg.Replace("-", ""); var bytes = BytesUtil.Hex2Bytes(msg); var buffer = Unpooled.WrappedBuffer(bytes); context.WriteAndFlushAsync(buffer); }
public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); BytesUtil.Serialize(current_salt, bw); BytesUtil.Serialize(new_salt, bw); StringUtil.Serialize(hint, bw); BoolUtil.Serialize(has_recovery, bw); StringUtil.Serialize(email_unconfirmed_pattern, bw); }