Password generator: Difference between revisions

Line 3,066:
9%-tYX]z?8-xA5</pre>
 
=={{header|Raku (functional) }}==
'''Alternative version.'''
 
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:
sub password-characters( @char-groups )
{
gather loop { take .pick for( @char-groups }xx Inf )
.map( |* )
.map( *.pick );
}
 
Line 3,117 ⟶ 3,119:
}
</lang>
 
'''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>
 
=={{header|REXX}}==
Anonymous user