当前位置:网站首页>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;
}
边栏推荐
- Programmers, what are your skills in code writing?
- Maximum product (greedy)
- Openwrt build Hello ipk
- Interval sum ----- discretization
- Frida hook so layer, protobuf data analysis
- 生成随机密码/验证码
- Essai de pénétration (1) - - outils nécessaires, navigation
- Auto. Getting started with JS
- Understand what is a programming language in a popular way
- 2027. Minimum number of operations to convert strings
猜你喜欢
Web based photo digital printing website
1013. Divide the array into three parts equal to and
快速转 TypeScript 指南
Determine the Photo Position
Information security - Epic vulnerability log4j vulnerability mechanism and preventive measures
读取和保存zarr文件
Frida hook so layer, protobuf data analysis
渗透测试 ( 1 ) --- 必备 工具、导航
Codeforces Round #797 (Div. 3)无F
Flask框架配置loguru日志庫
随机推荐
The "sneaky" new asteroid will pass the earth safely this week: how to watch it
Candy delivery (Mathematics)
Opencv learning log 27 -- chip positioning
860. Lemonade change
Auto. Getting started with JS
Flag framework configures loguru logstore
QT模拟鼠标事件,实现点击双击移动拖拽等
渗透测试 ( 5 ) --- 扫描之王 nmap、渗透测试工具实战技巧合集
Data storage in memory & loading into memory to make the program run
Borg maze (bfs+ minimum spanning tree) (problem solving report)
[exercise 4-1] cake distribution
1529. Minimum number of suffix flips
“鬼鬼祟祟的”新小行星将在本周安全掠过地球:如何观看
力扣:第81场双周赛
(POJ - 2739) sum of constructive prime numbers (ruler or two points)
JS call camera
Basic Q & A of introductory C language
[exercise -11] 4 values why sum is 0 (and 4 values of 0)
Codeforces - 1526C1&&C2 - Potions
Information security - security professional name | CVE | rce | POC | Vul | 0day