当前位置:网站首页>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;
}
边栏推荐
- 875. 爱吃香蕉的珂珂 - 力扣(LeetCode)
- Gartner: five suggestions on best practices for zero trust network access
- Information security - Analysis of security orchestration automation and response (soar) technology
- Web based photo digital printing website
- Information security - threat detection - detailed design of NAT log access threat detection platform
- Flask框架配置loguru日志库
- Flag framework configures loguru logstore
- 渗透测试 ( 1 ) --- 必备 工具、导航
- D - function (HDU - 6546) girls' competition
- Codeforces Round #800 (Div. 2)AC
猜你喜欢
![[exercise-4] (UVA 11988) broken keyboard = = (linked list)](/img/59/78ca7170ab1fd364ec44cfbcdc7ab5.png)
[exercise-4] (UVA 11988) broken keyboard = = (linked list)

2027. Minimum number of operations to convert strings

Codeforces Round #802(Div. 2)A~D

Borg maze (bfs+ minimum spanning tree) (problem solving report)

第 300 场周赛 - 力扣(LeetCode)

Penetration test (7) -- vulnerability scanning tool Nessus

window11 conda安装pytorch过程中遇到的一些问题

Openwrt build Hello ipk

Penetration test 2 --- XSS, CSRF, file upload, file inclusion, deserialization vulnerability

Codeforces Round #801 (Div. 2)A~C
随机推荐
QWidget代码设置样式表探讨
“鬼鬼祟祟的”新小行星将在本周安全掠过地球:如何观看
QT模拟鼠标事件,实现点击双击移动拖拽等
Common configuration files of SSM framework
Codeforces Round #798 (Div. 2)A~D
Auto. Getting started with JS
605. Planting flowers
Luogu P1102 A-B number pair (dichotomy, map, double pointer)
【练习-6】(PTA)分而治之
Is the sanic asynchronous framework really so strong? Find truth in practice
If you want to apply for a programmer, your resume should be written like this [essence summary]
C language learning notes
Read and save zarr files
[exercise-7] (UVA 10976) fractions again?! (fraction split)
Socket communication
Information security - threat detection engine - common rule engine base performance comparison
pytorch提取骨架(可微)
Frida hook so layer, protobuf data analysis
2078. Two houses with different colors and the farthest distance
socket通讯