摘要:
Node.js通过密钥计算验证码,无需存数据库 const CRC32 = require('crc-32'); function XixiOtp(sKey, iKeeptime = 600) { const oPri = {}; oPri.sKey = sKey; oPri.iKeeptime =
阅读全文
posted @ 2022-11-19 20:03
项希盛
阅读(83)
推荐(0)
编辑
摘要:
通过加密计算出短信验证码,无需缓存验证码 <?php class XixiOtp { private $iKeeptime; // 验证码有效期 private $sKey; // 加密用的密钥 private $p1Len = 1; // 验证码前缀长度(建议1~2) private $p2Len
阅读全文
posted @ 2022-11-19 18:26
项希盛
阅读(88)
推荐(0)
编辑