Random Salt

They have: 568 posts

Joined: Nov 1999

Does anyone have a snippet of code that can give me a random salt char to use in a .htpasswd program?

They have: 2 posts

Joined: Jul 2000

in perl i assume?

sub rand_char
{
my (@ch) = ('a'..'z','A'..'Z',0..9);
srand(time / $$);
return $ch[rand($#ch)];
}

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.