a
This commit is contained in:
@@ -4,9 +4,10 @@ import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"crypto/sha1"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/alipayapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"golang.org/x/text/encoding/simplifiedchinese"
|
||||
"golang.org/x/text/transform"
|
||||
@@ -769,8 +770,15 @@ func TestUpdateStatus(t *testing.T) {
|
||||
//fmt.Println(int2h8l8(int64(len("fd003401005b76325dc8d5d5d5cfe3c2afc9fad7cfd1cca3acd2a3bfb4c6d9b2bcb9d2c7b0b4a8a3acb7c9c1f7d6b1cfc2c8fdc7a7b3dfa3acd2c9cac7d2f8bad3c2e4bec5ccec") / 2)))
|
||||
//fmt.Println(hex.EncodeToString(data))
|
||||
//fmt.Println(fmt.Sprintf("%x", len("fd003401005b76325dc8d5d5d5cfe3c2afc9fad7cfd1cca3acd2a3bfb4c6d9b2bcb9d2c7b0b4a8a3acb7c9c1f7d6b1cfc2c8fdc7a7b3dfa3acd2c9cac7d2f8bad3c2e4bec5ccec")/2))
|
||||
str := "AA0D5ABE801F11E98489525400AE46A6e10adc3949ba59abbe56e057f20f883e"
|
||||
fmt.Println(fmt.Sprintf("%x", sha1.Sum([]byte(str))))
|
||||
mobile := &alipayapi.KeyMobile{}
|
||||
data, _ := base64.StdEncoding.DecodeString("QWja44PbYifX70Y74N3PU2dG2VedZFqqeXJhXV8g9cALnCOyXt25K6z2RQtAXlJR")
|
||||
key, _ := base64.StdEncoding.DecodeString("GHp3ojlVYRRu2XID4FX2ew==")
|
||||
iv := []byte{}
|
||||
iv = append(iv, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
if result, err := utils.AESCBCDecpryt(data, key, iv); err == nil && result != nil {
|
||||
json.Unmarshal(result, &mobile)
|
||||
}
|
||||
fmt.Println(utils.Format4Output(mobile, true))
|
||||
}
|
||||
|
||||
func sss() (data2 []byte) {
|
||||
|
||||
Reference in New Issue
Block a user