Commit 5d8c8b59 authored by 马旭烽's avatar 马旭烽

feat: 随机密码

parent 963e4474
import crypto from 'crypto';
import crypto from 'crypto';
import process from 'process';
const randomString = (len: number): string => {
return crypto.createHmac('sha256', 'fireman-34')
.update('weigao')
.digest('hex')
.slice(0,len)
};
const [
nodePath,
shellPath,
firstArg = "32",
] = process.argv;
const len = Number(process) || 32;
console.log('密码:');
console.log(randomString(32))
// 87aa7246c61698aa369adebd6f1b81a9 随机密码
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment