|
NAMECrypt::PRNG::RC4 - Cryptographically secure PRNG based on RC4 (stream cipher) algorithm SYNOPSIS ### Functional interface:
use Crypt::PRNG::RC4 qw(random_bytes random_bytes_hex random_bytes_b64 random_string random_string_from rand irand);
$octets = random_bytes(45);
$hex_string = random_bytes_hex(45);
$base64_string = random_bytes_b64(45);
$base64url_string = random_bytes_b64u(45);
$alphanumeric_string = random_string(30);
$string = random_string_from('ACGT', 64);
$floating_point_number_0_to_1 = rand;
$floating_point_number_0_to_88 = rand(88);
$unsigned_32bit_int = irand;
### OO interface:
use Crypt::PRNG::RC4;
$prng = Crypt::PRNG::RC4->new;
#or
$prng = Crypt::PRNG::RC4->new("some data used for seeding PRNG");
$octets = $prng->bytes(45);
$hex_string = $prng->bytes_hex(45);
$base64_string = $prng->bytes_b64(45);
$base64url_string = $prng->bytes_b64u(45);
$alphanumeric_string = $prng->string(30);
$string = $prng->string_from('ACGT', 64);
$floating_point_number_0_to_1 = rand;
$floating_point_number_0_to_88 = rand(88);
$unsigned_32bit_int = irand;
DESCRIPTIONProvides an interface to the RC4 based pseudo random number generator All methods and functions are the same as for Crypt::PRNG. FUNCTIONSrandom_bytesSee "random_bytes" in Crypt::PRNG. random_bytes_hexSee "random_bytes_hex" in Crypt::PRNG. random_bytes_b64See "random_bytes_b64" in Crypt::PRNG. random_bytes_b64uSee "random_bytes_b64u" in Crypt::PRNG. random_stringSee "random_string" in Crypt::PRNG. random_string_fromSee "random_string_from" in Crypt::PRNG. randSee "rand" in Crypt::PRNG. irandSee "irand" in Crypt::PRNG. METHODSnewSee "new" in Crypt::PRNG. bytesSee "bytes" in Crypt::PRNG. bytes_hexSee "bytes_hex" in Crypt::PRNG. bytes_b64See "bytes_b64" in Crypt::PRNG. bytes_b64uSee "bytes_b64u" in Crypt::PRNG. stringSee "string" in Crypt::PRNG. string_fromSee "string_from" in Crypt::PRNG. doubleSee "double" in Crypt::PRNG. int32See "int32" in Crypt::PRNG. SEE ALSO
|