当前位置:网站首页>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
- Auto.js入门
- [exercise-3] (UVA 442) matrix chain multiplication
- 力扣:第81场双周赛
- 【练习-1】(Uva 673) Parentheses Balance/平衡的括号 (栈stack)
- [exercise -11] 4 values why sum is 0 (and 4 values of 0)
- Flask框架配置loguru日志庫
- Opencv learning log 24 -- Hough transform 2 (maximum interval and minimum length can be limited)
- Codeforces Round #797 (Div. 3)无F
- Read and save zarr files
猜你喜欢

Analyse du format protobuf du rideau en temps réel et du rideau historique de la station B

Penetration test (4) -- detailed explanation of meterpreter command

Basic Q & A of introductory C language

TCP's three handshakes and four waves

QT实现窗口置顶、置顶状态切换、多窗口置顶优先关系

Codeforces Round #799 (Div. 4)A~H

Penetration test (2) -- penetration test system, target, GoogleHacking, Kali tool

Share an example of running dash application in raspberry pie.

Determine the Photo Position

渗透测试 ( 4 ) --- Meterpreter 命令详解
随机推荐
Raspberry pie csi/usb camera uses mjpg to realize web camera monitoring
[exercise-7] (UVA 10976) fractions again?! (fraction split)
读取和保存zarr文件
Interesting drink
[exercise 4-1] cake distribution
2078. Two houses with different colors and the farthest distance
Nodejs+vue online fresh flower shop sales information system express+mysql
计算时间差
Flask框架配置loguru日志庫
The most complete programming language online API document
QT实现窗口置顶、置顶状态切换、多窗口置顶优先关系
Borg maze (bfs+ minimum spanning tree) (problem solving report)
AcWing——第55场周赛
Perform general operations on iptables
Codeforces Round #799 (Div. 4)A~H
AcWing:第56场周赛
Sanic异步框架真的这么强吗?实践中找真理
Basic Q & A of introductory C language
1605. Sum the feasible matrix for a given row and column
Read and save zarr files