Name : perl-String-Random
| |
Version : 0.30
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.1
| Date : 2018-12-03 23:11:42
|
Group : Development/Libraries/Perl
| Source RPM : perl-String-Random-0.30-1.1.src.rpm
|
Size : 0.05 MB
| |
Packager : (none)
| |
Summary : Perl module to generate random strings based on a pattern
|
Description :
This module makes it trivial to generate random strings.
As an example, let\'s say you are writing a script that needs to generate a random password for a user. The relevant code might look something like this:
use String::Random; my $pass = String::Random->new; print \"Your password is \", $pass->randpattern(\"CCcc!ccn\"), \"\ \";
This would output something like this:
Your password is UDwp$tj5
*NOTE!!!*: currently, \'String::Random\' defaults to Perl\'s built-in predictable random number generator so the passwords generated by it are insecure. See the \'rand_gen\' option to \'String::Random\' constructor to specify a more secure random number generator. There is no equivalent to this in the procedural interface, you must use the object-oriented interface to get this functionality.
If you are more comfortable dealing with regular expressions, the following code would have a similar result:
use String::Random; my $pass = String::Random->new; print \"Your password is \", $pass->randregex(\'[A-Z]{2}[a-z]{2}.[a-z]{2}\\d\'), \"\ \";
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/SLE_12_SP4/noarch |
Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server
Provides :
perl(String::Random)
perl-String-Random
Requires :