
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
igit.xempower.cn/team-china/danghongyun-api-golang
当虹云api ,golang 非官方版本
虹视云的API,一般都会包含5个参数action,accessKey,version,timestamp 和 signature
action:api名称
accessKey:分配给用户的访问key。
version:api版本
timestamp:时间戳(1970年1月1日以来的毫秒数,格林尼治时间)
signature:请求签名,签名生成规则:对所有参数按照名称排序(CASE_INSENSITIVE_ORDER)生成一个字符串,并在字符串头上加上accessSecret,然后对该字符串调用[HmacSHA256](http://en.wikipedia.org/wiki/Hash-based_message_authentication_code) 算法生成signature。每一个API,根据输入参数的不同,生成的签名都是不同的。
我们以API:创建频道 为例来说明签名的生成,该接口的参数为accessKey,action,signature,version,timestamp,name:
accessKey = "a020e193-0f1"
accessSecret = "5GcXHNYdAVVdFW0yervG"
action = "ugcCreateChannel"
version = "2.0"
timestamp = "1466488681033"
name = "直播测试频道"
那么调用该接口的signature参数就是:
hmacSHA256Encrypt("5GcXHNYdAVVdFW0yervGaccessKey=a020e193-0f1action=ugcCreateChannelname=直播测试频道timestamp=1466488681033version=2.0", 5GcXHNYdAVVdFW0yervG)
计算后的值为
69a22291e517179e76e55ad7c21269c17462e102adf0eb0526cc5012d9b4cd9a
最终的请求为:
http://api.danghongyun.com/rest?timestamp=1466488681033&accessKey=a020e193-0f1&name=直播测试频道&action=ugcCreateChannel&signature=69a22291e517179e76e55ad7c21269c17462e102adf0eb0526cc5012d9b4cd9a&version=2.0
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.