...
|
...
|
@@ -14,24 +14,6 @@ import ( |
|
|
"testing"
|
|
|
)
|
|
|
|
|
|
//var priK = []byte(`-----BEGIN RSA PRIVATE KEY-----
|
|
|
//MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEA2H6x0D1mg5QbXfU7
|
|
|
//MZKltypRj+eZktPKIApyEqRsyLqe3sRSd1Eh+VqKlQ9QFI8dae3t0USWlVmyfIDM
|
|
|
//0ly85QIDAQABAkAPnKNJ9wOLfYSzs9l+66pTmROkovjqI6exw88SFRVbLCgM8maa
|
|
|
//GOWEP/nhZDlQYBKHUqG0/KsLkeyLGkE8N7JBAiEA8lM3npA3q+Kmhy+lmQbfHFPQ
|
|
|
//31OSkA+RaW/LPn0lP50CIQDktlF3iDk5kxnzgT/3lvvKhHInUh+pH5F19C6MymMD
|
|
|
//6QIgLxDct655MahnAdDOUCeWhBD/e7DmwZZUfu8Ywb1a070CIArsUjO9Q85mIiUp
|
|
|
//FR8EDP59GN6b43s2UMIraVW8DMKRAiEAnnMPbDsD2HsQbgmNNEqETUxYGVyO+p7w
|
|
|
//OZZReuOyvCM=
|
|
|
//-----END RSA PRIVATE KEY-----`)
|
|
|
//var pubPem = `-----BEGIN PUBLIC KEY-----
|
|
|
//MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANh+sdA9ZoOUG131OzGSpbcqUY/nmZLT
|
|
|
//yiAKchKkbMi6nt7EUndRIflaipUPUBSPHWnt7dFElpVZsnyAzNJcvOUCAwEAAQ==
|
|
|
//-----END PUBLIC KEY-----`
|
|
|
//var pubKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANh+sdA9ZoOUG131OzGSpbcqUY/nmZLT\nyiAKchKkbMi6nt7EUndRIflaipUPUBSPHWnt7dFElpVZsnyAzNJcvOUCAwEAAQ=="
|
|
|
//
|
|
|
//var host = "http://allied-creation-gateway-dev.fjmaimaimai.com"
|
|
|
|
|
|
var priK = []byte(`-----BEGIN RSA PRIVATE KEY-----
|
|
|
MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEA2H6x0D1mg5QbXfU7
|
|
|
MZKltypRj+eZktPKIApyEqRsyLqe3sRSd1Eh+VqKlQ9QFI8dae3t0USWlVmyfIDM
|
...
|
...
|
@@ -48,7 +30,7 @@ yiAKchKkbMi6nt7EUndRIflaipUPUBSPHWnt7dFElpVZsnyAzNJcvOUCAwEAAQ== |
|
|
-----END PUBLIC KEY-----`
|
|
|
var pubKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANh+sdA9ZoOUG131OzGSpbcqUY/nmZLTyiAKchKkbMi6nt7EUndRIflaipUPUBSPHWnt7dFElpVZsnyAzNJcvOUCAwEAAQ=="
|
|
|
|
|
|
var host = "http://101.34.29.149:9092/test"
|
|
|
var host = "https://shangchain.fjmaimaimai.com/prod" //"http://101.34.29.149:9092/test"
|
|
|
|
|
|
func TestSignature(t *testing.T) {
|
|
|
options := NewUpToChainOptions("table", "1", "149848948").WithDesc("desc")
|
...
|
...
|
@@ -145,7 +127,7 @@ func TestBSNBlockChain_GetToken(t *testing.T) { |
|
|
}
|
|
|
options := &GetTokenRequest{
|
|
|
Type: 1,
|
|
|
TsTxId: "54df75d3bead65d144a1123d1f18af8bb4db65420c5c449631e9a93b81fcdb93",
|
|
|
TsTxId: "b2e4b906b5ac7952d6b1adcc05681dc6aef5386b07c05e9cdc9ab9d565c17dd4",
|
|
|
ShowValue: true,
|
|
|
}
|
|
|
token, err := bc.GetToken(options)
|
...
|
...
|
|