当前位置:网站首页>Generate random password / verification code
Generate random password / verification code
2022-07-06 16:14:00 【Dream height 1.8 meters】
// len, Random length
const randomAuthorizeCode = (len) => {
// seed, Random range
var seed = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
let r = ''
// random Random selection
for (let i = 0; i < len; i++) {
let t = Math.round(Math.random() * (seed.length - 1));
r += seed[t];
}
return r;
}
边栏推荐
猜你喜欢

D - function (HDU - 6546) girls' competition
![[exercise-4] (UVA 11988) broken keyboard = = (linked list)](/img/59/78ca7170ab1fd364ec44cfbcdc7ab5.png)
[exercise-4] (UVA 11988) broken keyboard = = (linked list)
![MySQL import database error [err] 1273 - unknown collation: 'utf8mb4_ 0900_ ai_ ci’](/img/e6/f4a696179282fe1f4193410c5a493a.png)
MySQL import database error [err] 1273 - unknown collation: 'utf8mb4_ 0900_ ai_ ci’
快速转 TypeScript 指南
Frida hook so layer, protobuf data analysis

Analysis of protobuf format of real-time barrage and historical barrage at station B

Information security - threat detection - detailed design of NAT log access threat detection platform

渗透测试 ( 4 ) --- Meterpreter 命令详解

Penetration test (7) -- vulnerability scanning tool Nessus

Information security - threat detection - Flink broadcast stream broadcaststate dual stream merging application in filtering security logs
随机推荐
Is the sanic asynchronous framework really so strong? Find truth in practice
渗透测试 2 --- XSS、CSRF、文件上传、文件包含、反序列化漏洞
Maximum product (greedy)
Configuration du cadre flask loguru log Library
Read and save zarr files
Problem - 1646C. Factorials and Powers of Two - Codeforces
Auto.js入门
Codeforces Round #803 (Div. 2)A~C
QWidget代码设置样式表探讨
Truck History
生成随机密码/验证码
window11 conda安装pytorch过程中遇到的一些问题
Interesting drink
渗透测试 ( 4 ) --- Meterpreter 命令详解
Analysis of protobuf format of real-time barrage and historical barrage at station B
[exercise-6] (PTA) divide and conquer
[exercise-9] Zombie's Treasury test
Opencv learning log 27 -- chip positioning
Educational Codeforces Round 130 (Rated for Div. 2)A~C
F - birthday cake (Shandong race)