search for: urand

Displaying 5 results from an estimated 5 matches for "urand".

Did you mean: brand
2016 May 01
2
Changing Password Schemes
...ocalpart, domain, plain_pass FROM mailuser where crypt_pass IS NULL OR crypt_pass=""'); my $updatesth = $dbh->prepare('UPDATE mailuser SET crypt_pass=? where localpart=? and domain=?'); $selectsth->execute; while (my $row = $selectsth->fetchrow_hashref) { open my $urand, '<', '/dev/urandom'; read $urand, my $salt, 12; close $urand; $salt = encode_base64($salt); $salt =~ s/\+/\./g; $salt =~ s/[^0-9a-z\.\/]//ig; #this shouldn't be needed my $cryptpw = '{SHA512-CRYPT}' . crypt $row->{plain_pass}, '$6$'...
2016 May 01
3
Changing Password Schemes
...ere crypt_pass IS NULL OR crypt_pass=""'); >> my $updatesth = $dbh->prepare('UPDATE mailuser SET crypt_pass=? where >> localpart=? and domain=?'); >> $selectsth->execute; >> while (my $row = $selectsth->fetchrow_hashref) { >> open my $urand, '<', '/dev/urandom'; >> read $urand, my $salt, 12; >> close $urand; >> $salt = encode_base64($salt); >> $salt =~ s/\+/\./g; >> $salt =~ s/[^0-9a-z\.\/]//ig; #this shouldn't be needed >> my $cryptpw = '{SHA512-CR...
2016 Apr 30
2
Changing Password Schemes
This looks good, except it is truncated, it should be something like 95chars long, Is your hash column set to 128 or up around there or larger? Quoting Carl A Jeptha <cajeptha at gmail.com>: > Sorry for double reply, but this what a password looks like in the > "hashed" password column: > {SHA512-CRYPT}$6$wEn1UFuiMzl9OSjd$Vh/PZ95WDID1GwI2 > > ------------
2006 Sep 18
1
uniform integer RNG 0 to t inclusive
...(n, min, max) it states that the generated numbers will be min <= x <= max. Note the "<= max"... How do I generate an x such that the probability of being (the integer) max is the same as any other integer from min (an integer) to max-1 (an integer) inclusive... My attempt is: urand.int <- function(n,t) { as.integer(runif(n,min=0, max=t+1-.Machine$double.eps)) } # where I've included the parameter n to help testing... is floor() "better" than as.integer? Is this correct? Is the probability of the integer t the same as the integer 1 or 0 etc... I have done...
2000 Feb 15
3
Problem compiling 1.2.2 on solaris
I am trying to run the configure for 1.2.2 on an intel solaris 2.7 box and I get an error for urandom not found. I cant find anything related to rand, urand, random, rng, or urandom on my box. How can I get around this, or where can I get urandom? Chris