云鼎测试新订单
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
package jdshop
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"math"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
@@ -152,5 +156,15 @@ func setJdsOrderSeq(order *model.GoodsOrder) (err error) {
|
||||
}
|
||||
|
||||
func Decrypt(p string) (result string) {
|
||||
return result
|
||||
data, _ := base64.StdEncoding.DecodeString(strings.ReplaceAll(p, " ", "+"))
|
||||
key := GetKey(hex.EncodeToString(data)[2:18])
|
||||
data2, _ := base64.StdEncoding.DecodeString(key)
|
||||
b := bytes.NewBuffer(data)
|
||||
b.Next(18)
|
||||
iv := make([]byte, 16)
|
||||
b.Read(iv)
|
||||
main := make([]byte, len(data)-18-16)
|
||||
b.Read(main)
|
||||
decryptedData, _ := utils.AESCBCDecpryt(main, data2[:16], iv)
|
||||
return string(decryptedData)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user