Jump to content

Password generator: Difference between revisions

Line 3,067:
 
=={{header|Raku (functional) }}==
 
This has the pretty much the same interface as above, except the "count" parameter is mandatory.
The idea here is to have an infinite sequence of random password characters and
batch them up in groups of the wanted length. This solution relies heavily on Rakus lazy lists.
 
<lang perl6>
Line 3,105 ⟶ 3,101:
 
'''Sample output:'''
 
Using defaults:
<pre>Jk&>Az22</pre>
With passed parameters: --l=4 --c=5 --x=0O\'\"1l\|I
<pre>
+6cH
w,A9
A{2k
5_Vy
X_2k</pre>
Without parameters:
<pre>
Usage:
t2.p6 [-c|--count=<PositiveInt>] [-l|--length=<MinimumPasswordLength>] [-x|--exclude=<Str>]
X_2k</pre>
 
With passed parameters: -c=1
<pre>Jk&>Az22</pre>
With passed parameters: --l=4 --c=5 --x=0O\'\"1l\|Iabcdefghijklmnopqrstuvwxy
<pre>
zH5^
4zT;
9/zJ
z6_U
!zC8
</pre>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.