test
This commit is contained in:
parent
f9bde31169
commit
271c66fecd
16
job.go
16
job.go
@ -7,6 +7,7 @@ import (
|
||||
"crypto/aes"
|
||||
"crypto/sha256"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
@ -18,7 +19,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/lytics/base62"
|
||||
tb "gopkg.in/tucnak/telebot.v2"
|
||||
)
|
||||
|
||||
@ -1576,18 +1576,14 @@ func jobGWithdraw(j Job) {
|
||||
sha128 := sha256[:aes.BlockSize]
|
||||
c, err := aes.NewCipher(sha128)
|
||||
|
||||
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...)
|
||||
in := make([]byte, 8)
|
||||
binary.LittleEndian.PutUint64(in, uint64(id))
|
||||
out := make([]byte, len(in))
|
||||
|
||||
c.Encrypt(out, in)
|
||||
out = append(out, byte(0))
|
||||
out = append(out, byte(0))
|
||||
ref := base62.StdEncoding.EncodeToString(out)
|
||||
out = append(out, 0)
|
||||
out = append(out, 0)
|
||||
ref := hex.StdEncoding.EncodeToString(out)
|
||||
|
||||
log.Printf("jobGWithdraw[%d] : got all the info for ref %s\n", j.ID64, string(ref))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user