Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nodeStudy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马旭烽
nodeStudy
Commits
5d8c8b59
Commit
5d8c8b59
authored
Jul 13, 2023
by
马旭烽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 随机密码
parent
963e4474
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
随机密码.ts
shell/随机密码.ts
+24
-0
No files found.
shell/随机密码.ts
0 → 100644
View file @
5d8c8b59
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment