Skip to content

Commit

Permalink
Replace some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
KincaidYang committed Sep 6, 2023
1 parent e3c4c92 commit 772bbdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dnsapi/dns_tencent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ tencent_sha256() {
tencent_hmac_sha256() {
k=$1
shift
hex_key=$(_ascii_hex "$k" | tr -d ' ')
hex_key=$(printf %b "$k" | _hex_dump | tr -d ' ')
printf %b "$@" | _hmac sha256 "$hex_key" hex
}

Expand Down Expand Up @@ -183,6 +183,7 @@ tencent_signature_v3() {

credentialScope="$date/$service/tc3_request"
stringToSign="$algorithm\n$timestamp\n$credentialScope\n$(tencent_sha256 "$canonicalRequest")"
_debug "stringToSign: $stringToSign"

secretDate=$(tencent_hmac_sha256 "TC3$secretKey" "$date")
secretService=$(tencent_hmac_sha256_hexkey "$secretDate" "$service")
Expand Down

0 comments on commit 772bbdc

Please sign in to comment.