mirror of
https://github.com/fumiama/WireGold.git
synced 2026-07-02 00:20:26 +08:00
feat: add base14 en/decoding
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/fumiama/WireGold/config"
|
||||
"github.com/fumiama/WireGold/gold/head"
|
||||
base14 "github.com/fumiama/go-base16384"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -29,6 +30,9 @@ func (m *Me) wait(data []byte) *head.Packet {
|
||||
if config.ShowDebugLog {
|
||||
logrus.Debugln("[recv] data bytes", hex.EncodeToString(data[:bound]), endl)
|
||||
}
|
||||
if m.base14 {
|
||||
data = base14.Decode(data)
|
||||
}
|
||||
seq, data := m.xordec(data)
|
||||
if config.ShowDebugLog {
|
||||
logrus.Debugln("[recv] data xored", hex.EncodeToString(data[:bound]), endl)
|
||||
|
||||
Reference in New Issue
Block a user