We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7491e4f commit 0a96826Copy full SHA for 0a96826
Password.jl
@@ -0,0 +1,37 @@
1
+#Password.jl
2
+
3
+#Generate a random password
4
5
6
7
+len=16
8
9
+fullChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.;':[]{}|1234657890-=_+!@#\$%^&**()"
10
11
+fewChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234657890=!-@_*."
12
13
14
15
+function randomPassword(chars=fewChars)
16
17
+ numChars=length(chars)
18
19
+ p=""
20
21
+ for i in 1:len
22
23
+# global p
24
25
+ c=rand(1:numChars)
26
27
+ p=p*chars[c]
28
29
+ end
30
31
+ return p
32
33
+end
34
35
36
37
+println(randomPassword())
0 commit comments