当前位置:网站首页>生成随机密码/验证码
生成随机密码/验证码
2022-07-06 09:28:00 【梦想身高1米8】
// len,随机长度
const randomAuthorizeCode = (len) => {
// seed,随机范围
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随机选中
for (let i = 0; i < len; i++) {
let t = Math.round(Math.random() * (seed.length - 1));
r += seed[t];
}
return r;
}
边栏推荐
- Information security - Epic vulnerability log4j vulnerability mechanism and preventive measures
- [exercise-5] (UVA 839) not so mobile (balance)
- C language is the watershed between low-level and high-level
- 7-1 understand everything (20 points)
- Penetration test (4) -- detailed explanation of meterpreter command
- Codeforces Round #801 (Div. 2)A~C
- QT实现窗口渐变消失QPropertyAnimation+进度条
- 栈的经典应用—括号匹配问题
- Is the sanic asynchronous framework really so strong? Find truth in practice
- 第 300 场周赛 - 力扣(LeetCode)
猜你喜欢

Borg maze (bfs+ minimum spanning tree) (problem solving report)
Quick to typescript Guide
![[teacher Gao UML software modeling foundation] collection of exercises and answers for level 20 cloud class](/img/57/bc6eda91f7263acda38b9ee8732318.png)
[teacher Gao UML software modeling foundation] collection of exercises and answers for level 20 cloud class

X-forwarded-for details, how to get the client IP

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

Sword finger offer II 019 Delete at most one character to get a palindrome

Flask框架配置loguru日志库

QT实现窗口渐变消失QPropertyAnimation+进度条

Share an example of running dash application in raspberry pie.

Write web games in C language
随机推荐
[exercise-6] (PTA) divide and conquer
[analysis of teacher Gao's software needs] collection of exercises and answers for level 20 cloud class
Determine the Photo Position
渗透测试 ( 7 ) --- 漏洞扫描工具 Nessus
QT实现圆角窗口
[exercise -10] unread messages
Penetration test (2) -- penetration test system, target, GoogleHacking, Kali tool
Penetration test (1) -- necessary tools, navigation
Common configuration files of SSM framework
【练习-8】(Uva 246)10-20-30==模拟
Penetration test (8) -- official document of burp Suite Pro
Sanic异步框架真的这么强吗?实践中找真理
QT按钮点击切换QLineEdit焦点(含代码)
Basic Q & A of introductory C language
[exercise-6] (UVA 725) division = = violence
Quick to typescript Guide
Penetration test 2 --- XSS, CSRF, file upload, file inclusion, deserialization vulnerability
[exercise-8] (UVA 246) 10-20-30== simulation
Essai de pénétration (1) - - outils nécessaires, navigation
Opencv learning log 28 -- detect the red cup cover