fixed decryption key not being 16 bytes long

This commit is contained in:
2022-04-03 18:30:46 +02:00
parent 0cf73c2aab
commit caf173eb1c

View File

@@ -16,7 +16,6 @@ import (
"google.golang.org/protobuf/proto"
"io/ioutil"
"os"
"strconv"
"strings"
"sync"
"time"
@@ -432,7 +431,7 @@ func (dml *DemoMatchLoader) handleDemo(demo *Demo, apiKey string, rl *rate.Limit
demo.Url = lastRound.GetMap()
demo.MatchId = matchZero.GetMatchid()
demo.DecryptionKey = []byte(strings.ToUpper(strconv.FormatUint(matchZero.GetWatchablematchinfo().GetClDecryptdataKeyPub(), 16)))
demo.DecryptionKey = []byte(strings.ToUpper(fmt.Sprintf("%016x", matchZero.GetWatchablematchinfo().GetClDecryptdataKeyPub())))
tMatch, err := dml.db.Match.Create().
SetID(matchZero.GetMatchid()).