1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00
MiraiGo/internal/tlv/t142.go
源文雨 3e84f279c1
fix: use general write at method (#225)
* fix: use general write at method

* fix: drop WriteShortBufLenExcludeSelfAfterPos
2021-12-23 22:09:04 +08:00

14 lines
296 B
Go

package tlv
import "github.com/Mrs4s/MiraiGo/binary"
func T142(apkId string) []byte {
return binary.NewWriterF(func(w *binary.Writer) {
w.WriteUInt16(0x142)
pos := w.FillUInt16()
w.WriteUInt16(0)
w.WriteTlvLimitedSize([]byte(apkId), 32)
w.WriteUInt16At(pos, uint16(w.Len()-4))
})
}