aa
This commit is contained in:
@@ -1,11 +1,27 @@
|
||||
package alipayapi
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSystemAuthToken(t *testing.T) {
|
||||
result, err := api.SystemAuthToken(GrantTypeCode, "c91ed60bebae473b9507a08e0c86NE98", "")
|
||||
t.Log(err)
|
||||
t.Log(result)
|
||||
result, err := api.SystemAuthToken(GrantTypeCode, "f18d4a91c42e4803a8018db2620fUX91", "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestDDDD(t *testing.T) {
|
||||
sign := "GHp3ojlVYRRu2XID4FX2ew=="
|
||||
data := "QWja44PbYifX70Y74N3PUwecCVtE3k+VSznUe3G0BVx6GiEAkGSJ5H7h9tP4Hnjau2E7N911BASFPTznphUcyA=="
|
||||
data1, _ := base64.StdEncoding.DecodeString(data)
|
||||
sign1, _ := base64.StdEncoding.DecodeString(sign)
|
||||
iv := []byte{}
|
||||
iv = append(iv, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
result, _ := utils.AESCBCDecpryt(data1, sign1, iv)
|
||||
fmt.Println(string(result))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user