From d02d14a27b70a85354070df7bb399c1a493319e4 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 15 Jan 2020 19:00:49 +0800 Subject: [PATCH] fix --- job.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/job.go b/job.go index e3775e0..f7815a3 100644 --- a/job.go +++ b/job.go @@ -1576,13 +1576,15 @@ func jobGWithdraw(j Job) { sha128 := sha256[:aes.BlockSize] c, err := aes.NewCipher(sha128) - in := make([]byte, 8) - binary.LittleEndian.PutUint64(in, uint64(id)) + in := make([]byte, 0) + buf := make([]byte, 8) + binary.LittleEndian.PutUint64(buf, uint64(id)) + in = append(in, buf...) + binary.LittleEndian.PutUint64(buf, uint64(j.UserID64)) + in = append(in, buf...) out := make([]byte, len(in)) c.Encrypt(out, in) - out = append(out, 0) - out = append(out, 0) ref := hex.EncodeToString(out) log.Printf("jobGWithdraw[%d] : got all the info for ref %s\n", j.ID64, string(ref))