API签名算法易SDK

易语言 2020-10-14 11:54:41

kSecret = Access_Key_Secret
kDate = QY_加密_rstr_hmac_sha256 (到字节集 (“JDCLOUD2” + kSecret), 到字节集 (Date))
kRegion = QY_加密_rstr_hmac_sha256 (kDate, 到字节集 (Region))
kService = QY_加密_rstr_hmac_sha256 (kRegion, 到字节集 (Service))
kSigning = QY_加密_rstr_hmac_sha256 (kService, 到字节集 (“jdcloud2_request”))
signResult = QY_加密_rstr2hex (QY_加密_rstr_hmac_sha256 (kSigning, 到字节集 (待签字符串)))
Authorization = “JDCLOUD2-HMAC-SHA256 Credential=” + Access_Key_ID + “/” + Date + “/” + Region + “/” + Service + “/jdcloud2_request, SignedHeaders=” + SignedHeaders + “, Signature=” + signResult
Jdcloud_Head = 京东云_get_head (Jdcloud_Host, Jdcloud_Date, Jdcloud_Nonce, Authorization)