- or download this
open RANDOM, RANDOM_DEVICE or die "Cannot open " . RANDOM_DEVICE . ":
+$!";
$rc = read RANDOM, $secret, $bytes;
...
# quote the binary value for inclusion in a double-quote string
$secret =~ s/[\x00-\xff]/sprintf '\\%o', ord $&/gex;
- or download this
my $sessionid = $dbh->selectrow_array
( "SELECT nextval('UserSessionSeq')" );
- or download this
my $sessiondigest = md5_hex(sprintf("%u %s", $sessionid, Voter->SECRET
+)
- or download this
$dbh->selectrow_array
( "SELECT UserID, Activeuser, Created, Modified" .
...
$sessiondigest );
# if a row was returned then it was a good match otherwise something
+ is wrong (the session might have just expired as well - views are us
+eful for that)