ask nodejs Wechat to encrypt the code. Wechat only provides CPP, php, Java, Python and C-sharp versions.
ask nodejs Wechat to encrypt the code. Wechat only provides CPP, php, Java, Python and C-sharp versions.
      // 1.Get signaturetimestampnonceechostr
      // 2.tokentimestampnonce
      let array = [config.wechat.token, ctx.query.timestamp, ctx.query.nonce]
      array.sort()
      // 3.sha1
      let resultCode = _util.hashCry(array.join(''))
exports.hashCry = str => {
  const hashCode = crypto.createHash('sha1') // 
  return hashCode.update(str, 'utf8').digest('hex')
}Previous: There is an extra symbol in front of the text in the h tag under Google browser
Next: Error submitting project to SVN: Commit blocked by pre-commit hook