Merge pull request #52 from PretendoNetwork/fix/pidhmac-alg
Some checks failed
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Has been cancelled
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Has been cancelled

fix: use sha256 hmac in NintendoCreateAccount
This commit is contained in:
Jonathan Barrow
2026-10-05 16:11:48 -04:00
committed by GitHub

View File

@@ -2,7 +2,7 @@ package nex_account_management
import (
"crypto/hmac"
"crypto/md5"
"crypto/sha256"
"strconv"
"github.com/PretendoNetwork/friends/globals"
@@ -28,7 +28,7 @@ func NintendoCreateAccount(err error, packet nex.PacketInterface, callID uint32,
pidString := strconv.FormatUint(uint64(pid), 10)
mac := hmac.New(md5.New, []byte(globals.Config.PIDHmacKey))
mac := hmac.New(sha256.New, []byte(globals.Config.PIDHmacKey))
_, err = mac.Write([]byte(pidString))
if err != nil {
globals.Logger.Error(err.Error())