采用 python 撰写,主要代码如下:
sign = '&'.join(['a=' + appId, 'b=' + bucket, 'k=' + secretId, 'e=' + str(expire), 't=' + str(current), 'r=' + tmp, 'u=' + str(userId), 'f=' + fileId])
myhmac = hmac.new(secretKey.encode('utf8'), sign.encode('utf8'), sha1).digest()
rsign = base64.b64encode(myhmac)
提交后提示 decode sign failed,是啥问题?
相似问题