On Mon, 2007-01-01 at 10:01 -0800, Ryan Roth wrote:
> while len(salt) < 8:
>   char = os.urandom(1)
>   if re.match('[a-zA-Z0-9]', char) > -1:
>       salt = salt + char

This is fine.  A bit hungrier than the code I suggested, but then it
doesn't need to be fast. I'd get rid of "> -1"

Cheers,
Jason.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to