Skip to content

Commit 06304b9

Browse files
committed
update getAuth sha1
1 parent 968eafa commit 06304b9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sdk/util.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ var getAuth = function (opt) {
9696
formatString = Buffer.from(formatString, 'utf8');
9797

9898
// 步骤三:计算 StringToSign
99-
var sha1Algo = crypto.createHash('sha1');
100-
sha1Algo.update(formatString);
101-
var res = sha1Algo.digest('hex');
99+
var res = crypto.createHash('sha1').update(formatString).digest('hex');
102100
var stringToSign = ['sha1', qSignTime, res, ''].join('\n');
103101

104102
// 步骤四:计算 Signature

0 commit comments

Comments
 (0)