github.com/gotd/td/bin.Buffer.Buf (field)

156 uses

	github.com/gotd/td/bin (current package)
		buffer.go#L9: 	Buf []byte
		buffer.go#L24: 	b.Buf = append(b.Buf[:0], make([]byte, n)...)
		buffer.go#L29: 	b.Buf = append(b.Buf, make([]byte, n)...)
		buffer.go#L34: 	b.Buf = b.Buf[n:]
		buffer.go#L42: 	if len(b.Buf) == 0 {
		buffer.go#L45: 	n = copy(p, b.Buf)
		buffer.go#L46: 	b.Buf = b.Buf[n:]
		buffer.go#L52: 	return append([]byte{}, b.Buf...)
		buffer.go#L57: 	return b.Buf
		buffer.go#L62: 	return len(b.Buf)
		buffer.go#L70: 	b.Buf = buf
		decode.go#L11: 	if len(b.Buf) < Word {
		decode.go#L14: 	v := binary.LittleEndian.Uint32(b.Buf)
		decode.go#L23: 	if len(b.Buf) < n {
		decode.go#L26: 	copy(target, b.Buf[:n])
		decode.go#L41: 	b.Buf = b.Buf[Word:]
		decode.go#L48: 	if len(b.Buf) < size {
		decode.go#L51: 	v := binary.LittleEndian.Uint64(b.Buf)
		decode.go#L52: 	b.Buf = b.Buf[size:]
		decode.go#L73: 	b.Buf = b.Buf[n:]
		decode.go#L85: 		b.Buf = b.Buf[Word:]
		decode.go#L88: 		b.Buf = b.Buf[Word:]
		decode.go#L106: 	b.Buf = b.Buf[Word:]
		decode.go#L130: 	n, v, err := decodeString(b.Buf)
		decode.go#L134: 	if len(b.Buf) < n {
		decode.go#L137: 	b.Buf = b.Buf[n:]
		decode.go#L145: 	n, v, err := decodeBytes(b.Buf)
		decode.go#L149: 	if len(b.Buf) < n {
		decode.go#L152: 	b.Buf = b.Buf[n:]
		decode.go#L192: 	if len(b.Buf) < size {
		decode.go#L195: 	copy(v[:size], b.Buf[:size])
		decode.go#L196: 	b.Buf = b.Buf[size:]
		decode.go#L204: 	if len(b.Buf) < size {
		decode.go#L207: 	copy(v[:size], b.Buf[:size])
		decode.go#L208: 	b.Buf = b.Buf[size:]
		encode.go#L17: 	b.Buf = append(b.Buf, raw...)
		encode.go#L22: 	b.Buf = encodeString(b.Buf, s)
		encode.go#L27: 	b.Buf = encodeBytes(b.Buf, v)
		encode.go#L57: 	b.Buf = append(b.Buf, t...)
		encode.go#L69: 	b.Buf = append(b.Buf, t...)
		encode.go#L86: 	b.Buf = append(b.Buf, t...)
		encode.go#L96: 	b.Buf = append(b.Buf, v[:]...)
		encode.go#L101: 	b.Buf = append(b.Buf, v[:]...)
		encode.go#L106: 	b.Buf = b.Buf[:0]
		pool.go#L20: 				return &Buffer{Buf: r}

	github.com/gotd/td/internal/crypto
		cipher_decrypt.go#L42: 	if err := msg.DecodeWithoutCopy(&bin.Buffer{Buf: plaintext}); err != nil {
		cipher_encrypt.go#L16: 	offset := len(plaintext.Buf)
		cipher_encrypt.go#L17: 	plaintext.Buf = append(plaintext.Buf, make([]byte, countPadding(offset))...)
		cipher_encrypt.go#L18: 	if _, err := io.ReadFull(c.rand, plaintext.Buf[offset:]); err != nil {
		cipher_encrypt.go#L22: 	messageKey := MessageKey(k.Value, plaintext.Buf, c.encryptSide)
		cipher_encrypt.go#L31: 		EncryptedData: make([]byte, len(plaintext.Buf)),
		cipher_encrypt.go#L33: 	ige.EncryptBlocks(aesBlock, iv[:], msg.EncryptedData, plaintext.Buf)
		encrypted_message.go#L47: 	e.EncryptedData = b.Buf
		encrypted_message_data.go#L53: 	(&bin.Buffer{Buf: b.Buf[lengthOffset:lengthOffset]}).PutInt(msgLen)
		encrypted_message_data.go#L94: 	e.MessageDataWithPadding = append(e.MessageDataWithPadding[:0], b.Buf...)
		encrypted_message_data.go#L143: 	e.MessageDataWithPadding = b.Buf
		rand.go#L27: 	b := &bin.Buffer{Buf: buf[:]}
		rand.go#L39: 	b := &bin.Buffer{Buf: buf[:]}
		rand.go#L51: 	b := &bin.Buffer{Buf: buf[:]}
		rsa_fingerprint.go#L24: 	_, _ = h.Write(buf.Buf)

	github.com/gotd/td/internal/exchange
		client_flow.go#L105: 	data, err := crypto.RSAPad(b.Buf, selectedPubKey.RSA, c.rand)
		client_flow.go#L202: 		clientEncrypted, err := crypto.EncryptExchangeAnswer(c.rand, b.Buf, key, iv)

	github.com/gotd/td/internal/mtproto
		handle_container.go#L25: 	b := &bin.Buffer{Buf: msg.Body}
		handle_gzip.go#L15: 	return &bin.Buffer{Buf: content.Data}, nil
		new_encrypted_msg.go#L57: 				MessageDataWithPadding: payloadBuf.Buf,
		read.go#L83: 	if err := c.handleMessage(msg.MessageID, &bin.Buffer{Buf: msg.Data()}); err != nil {

	github.com/gotd/td/internal/mtproxy/faketls
		client_hello.go#L19: 		b.Buf = append(b.Buf, s...)
		client_hello.go#L22: 		randomOffset = len(b.Buf)
		client_hello.go#L29: 		b.Buf = append(b.Buf, sessionID[:]...)
		client_hello.go#L32: 		b.Buf = append(b.Buf, domain...)
		client_hello.go#L35: 		b.Buf = append(b.Buf, key[:]...)
		client_hello.go#L48: 		binary.BigEndian.PutUint16(b.Buf[s:], uint16(length))
		client_hello.go#L103: 		Buf: make([]byte, 0, 576),
		client_hello.go#L109: 	if _, err := mac.Write(b.Buf); err != nil {
		client_hello.go#L114: 	copy(b.Buf[randomOffset:randomOffset+32], s)
		client_hello.go#L116: 	old := binary.LittleEndian.Uint32(b.Buf[randomOffset+28 : randomOffset+32])
		client_hello.go#L118: 	binary.LittleEndian.PutUint32(b.Buf[randomOffset+28:randomOffset+32], old)
		client_hello.go#L121: 	copy(r[:], b.Buf[randomOffset:randomOffset+32])
		client_hello.go#L122: 	_, err = w.Write(b.Buf)

	github.com/gotd/td/internal/proto
		rpc_result.go#L37: 	r.Result = append(r.Result[:0], b.Buf...)
		rpc_result.go#L38: 	b.Skip(len(b.Buf))

	github.com/gotd/td/internal/proto/codec
		abridged.go#L85: 	b.Buf = b.Buf[:length]
		abridged.go#L88: 	inner := bin.Buffer{Buf: b.Buf[length:length]}
		abridged.go#L110: 	if _, err := w.Write(inner.Buf); err != nil {
		abridged.go#L122: 	_, err := io.ReadFull(r, b.Buf[:1])
		abridged.go#L127: 	if b.Buf[0] >= 127 {
		abridged.go#L128: 		_, err := io.ReadFull(r, b.Buf[0:3])
		abridged.go#L140: 	if _, err := io.ReadFull(r, b.Buf); err != nil {
		codec.go#L34: 	if _, err := io.ReadFull(r, b.Buf[:bin.Word]); err != nil {
		codec.go#L37: 	n := int(binary.LittleEndian.Uint32(b.Buf[:bin.Word]))
		full.go#L54: 	write := bin.Buffer{Buf: make([]byte, 0, 4+4+b.Len()+4)}
		full.go#L86: 	inner := &bin.Buffer{Buf: b.Buf[bin.Word:n]}
		full.go#L90: 	if _, err := io.ReadFull(r, inner.Buf); err != nil {
		full.go#L112: 	clientCRC := crc32.ChecksumIEEE(b.Buf[0 : n-bin.Word])
		full.go#L121: 	copy(b.Buf, b.Buf[2*bin.Word:n-bin.Word])
		full.go#L122: 	b.Buf = b.Buf[:payloadLength]
		intermediate.go#L84: 	b.Buf = b.Buf[:length]
		intermediate.go#L86: 	inner := bin.Buffer{Buf: b.Buf[length:length]}
		intermediate.go#L88: 	if _, err := w.Write(inner.Buf); err != nil {
		intermediate.go#L91: 	if _, err := w.Write(b.Buf); err != nil {
		intermediate.go#L105: 	if _, err := io.ReadFull(r, b.Buf); err != nil {
		intermediate.go#L111: 		b.Buf = b.Buf[:n-paddingLength]
		padded_intermediate.go#L85: 		b.Buf = b.Buf[:length]
		padded_intermediate.go#L88: 	_, err := io.ReadFull(randSource, b.Buf[length:length+4])
		padded_intermediate.go#L92: 	n := int(b.Buf[length-1]) % 4
		padded_intermediate.go#L93: 	b.Buf = b.Buf[:length+n]
		padded_intermediate.go#L104: 	b.Buf = b.Buf[:b.Len()-padding]

	github.com/gotd/td/session/tdesktop
		dbi.go#L100: 	sub := bin.Buffer{Buf: r.buf.Buf}
		dbi.go#L105: 	sub.Buf = sub.Buf[:length]
		dbi.go#L139: 	s := string(r.buf.Buf[:size])
		dbi.go#L159: 	s := append([]byte(nil), r.buf.Buf[:size]...)
		mtp_authorization.go#L35: 	r := qtReader{buf: bin.Buffer{Buf: decrypted}}
		mtp_config.go#L85: 	root := qtReader{buf: bin.Buffer{Buf: decrypted}}

	github.com/gotd/td/telegram/dcs
		dns.go#L78: 	if err := cfg.Decode(&bin.Buffer{Buf: decrypted[4:]}); err != nil {