api身份验证失败,因为尝试使用哈希

问题描述

我正在尝试将 api 签名与以下内容进行匹配:

API-Sign = Message signature using HMAC-SHA512 of (URI path + SHA256(nonce + POST data)) and base64 decoded secret API key

我现在的代码

<cfset x = createobject("java","java.lang.System").currentTimeMillis()>
<cfset sts =  "https://api.exmaple.com/records" & hash(x,"SHA-512","UTF-8")>
<cfset sig = tobase64(hmac(sts,"#secret_key#","HMACSHA256"))>

但是出了点问题,无法验证,出现内部错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)