Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fengxq2014/aliyun-signature

阿里云请求参数签名
https://github.com/fengxq2014/aliyun-signature

aliyun aliyun-sdk aliyun-signature

Last synced: 27 days ago
JSON representation

阿里云请求参数签名

Awesome Lists containing this project

README

        

# aliyun-signature
阿里云请求参数签名

## 用法
`import "github.com/Fengxq2014/aliyun-signature/signature"`

### 生成get请求地址
```golang
signature.ComposeURL(inUrlValues, "testKeySecret", "http://vod.cn-shanghai.aliyuncs.com")
```

### 对url.Values排序并转义特殊字符
```golang
signature.SortQueryString(url.Values)
```

### 对string进行签名
```golang
signature.ComputeSignature(sortStr, accessSecret, "")
// 最后一个参数为空时为"GET"
```

## License ##

This library is distributed under the MIT License found in the [LICENSE](./LICENSE)
file.