That continental drift really sneaks up on you.
E
ephemeris1
@ephemeris1
0
Reputation
3
Posts
23
Profile views
0
Followers
0
Following
Best posts made by ephemeris1
This user hasn't posted anything yet.
Latest posts made by ephemeris1
-
A geography lesson from Electronic Arts
-
This might void my... Wait. What now?
Oh wow. Well that's scary. Would hate to lose my warranty.
Lets see here...
*Sigh* really Mozilla, I expect better from you.And before you ask, Yes my pedantic knob is always set to 11. I always thought this was a side effect of programing.
Just idle curiosity. What happens when you void something you don't have? Is that like a divide by zero error? Or does it negate, that is, am I now in possession of a highly coveted Mozilla warranty?
-
What hash function?
While I don't really speak perl, I was trying to fix a minor bug in our long term archives management utility. This function, found deep in the encryption system made my blood run cold.
# # Create and return a password. # Parms: Seed (number or string) # Number of chars in password # Return: String of random characters sub makePassword($;$) { my $seed = shift; my $length = shift; my ($pascode, $code, $range, @chars); if (not $length) { $length = 8; } @chars = (('a'..'z'),('A'..'Z'),(0..9));# Select from these $range = scalar(@chars); # Count of characters $pascode = ''; # Clear the password $seed =~ tr/[A-Za-z]/[0-90-90-50-90-90-5]/; # Change letters to numbers srand($seed); # Password based on volume id while (length($pascode) < $length) { $code = int(rand($range)); # Select a character if ($code >= 0 && $code <= $range) { $pascode .= $chars[$code]; # Add it to the code } } return $pascode; }
Now I'm curious, how deep does this rabbit hole go?
printf("%s\n", makePassword("012345") );
- Windows98: oKWPlSZk (heh TrWTF, this is the utilitys native system)
- OpenBSD 5.1: n4mST4v1