Joke Collection Website - Blessing messages - Js opens a short message
Js opens a short message
const? Password? =? require(“crypto”);
Function? Signature ()
{
var? strMobile? =? "This is my mobile phone"; ? //The contents of the mobile field of //tel.
var? Strapki =? "This is my key"; ? //appkey corresponding to //sdkappid needs to be kept highly confidential by business parties.
var? strRand? =? "7226249334"; ? //The value of the random field in the //url.
var? strTime? =? " 1457336869"; ? //unix timestamp
var? buf? =? “appkey =“+strAppKey+“& amp; random =“+strRand+“& amp; Time = "
+strTime+“& amp; mobile =“+strMobile;
var? Siegel? =? crypto . create hash(‘sha 256‘)。 Update (buf,? utf-8’)。 digest(‘hex‘);
Return? sig
}
Console. log(SIG()); The output results are as follows:
7b1e97051886ad66c684530db2b01644f828f31E06D624d88af5469afaa0 The reason is that utf-8 is emphasized in the document, but the default encoding of js is not this, so it needs to be specified.
In addition, the calculation result of this sig is related to your output parameter, which is not a constant.
Also, your mobile phone and appkey are both in Chinese, and the official ones seem to be numbers and letters.
- Related articles
- Why don't you need WeChat copy and paste?
- After receiving the admission notice from Poly Real Estate Online Recruitment, why should I first go to other provinces for assignment and then select the best candidates?
- Meizu m8 come in and have a look, such as the picture. Why is there something like scratches in the text message? It doesn't matter if I look at the screen. How to answer this?
- Everbright Bank was informed that the infringement of consumers' rights and interests involved six types of violations.
- How big is the transit space of Xiamen Airlines?
- How to delete Apple SMS with one click?
- You can enjoy 30e 5G WeChat. Why does it ring when it clicks in?
- What does it mean that the traffic management applicant 12 123 received the verification code?
- If you thank others for your birthday.
- What about ios 15 widget blank?