SylviaBABY commented on code in PR #6895: URL: https://github.com/apache/apisix/pull/6895#discussion_r854903447
########## docs/zh/latest/plugins/hmac-auth.md: ########## @@ -84,34 +98,33 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f13 ### 签名生成公式 -签名的计算公式为 `signature = HMAC-SHAx-HEX(secret_key, signing_string)`,从公式可以看出,想要获得签名需要得到 `secret_key` 和 `signing_string` 两个参数。其中 `secret_key` 为对应 consumer 所配置的, `signing_string` 的计算公式为 `signing_string = HTTP Method + \n + HTTP URI + \n + canonical_query_string + \n + access_key + \n + Date + \n + signed_headers_string`。如果 signing_string 中的某一项不存在,也需要使用一个空字符串代替。 +签名的计算公式为 `signature = HMAC-SHAx-HEX(secret_key, signing_string)`。 + +为了生成签名需要两个参数:`secret_key` 和 `signing_string`。其中 `secret_key` 由对应 Consumer 配置,`signing_string` 的计算公式为 `signing_string = HTTP Method + \n + HTTP URI + \n + canonical_query_string + \n + access_key + \n + Date + \n + signed_headers_string`。如果 `signing_string` 中的某一项不存在,也需要使用一个空字符串代替: Review Comment: ```suggestion 为了生成签名需要两个参数:`secret_key` 和 `signing_string`。其中 `secret_key` 由对应 Consumer 配置,`signing_string` 的计算公式为 `signing_string = HTTP Method + \n + HTTP URI + \n + canonical_query_string + \n + access_key + \n + Date + \n + signed_headers_string`。如果 `signing_string` 中的某一项不存在,则需要使用一个空字符串代替: ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org