You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
499 B

const access_key = '6374106c5eb449a4ad6c2430f30796e6';
const access_secret = '434fec85aa5846e88bbeb8fac6cf6d7f';
// generateRandomNumber()
const nonce = "887954";
const timestamp = `${Date.now()}`;
const str = [access_secret, nonce, timestamp]
.sort()
.reduce((str, item) => str += item, '');
// 最终还需要转成全小写
const signature = sha1(str).toString().toLowerCase();
var siqObject = {
access_key: access_key,
nonce: nonce,
timestamp: timestamp,
signature: signature,
};