n9m/utils.go

26 lines
731 B
Go
Raw Normal View History

2023-11-29 11:16:00 +00:00
package n9m
import (
"encoding/hex"
)
2023-11-30 17:05:11 +00:00
// add bytes to accum
2023-11-29 11:16:00 +00:00
func (e *Package) AddToAccum(data []byte) {
e.Accum = append(e.Accum, data...)
}
// why store a string and constantly change it to the same thing
// the stored string is not used
func (e *Package) GetToken() {
hexStream := "3876431502000010380000007b224b4559223a22434c49454e544c4f47494e222c22524553504f4e5345223a7b22434c49454e544944223a2237643531323030227d7d00"
e.RawPayload, _ = hex.DecodeString(hexStream)
}
// the same
func (e *Package) RequestGetTokenDop() {
hexStream := "3876431501000010360000007b224b4559223a224c4f47494e222c22504152414d223a7b224355534552223a2231222c22505744223a22313233343536227d7d0a00"
e.RawPayload, _ = hex.DecodeString(hexStream)
}