Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Feedback Form | Site Map | WP Backend | RSS2 | Atom

« Email2 | zipme.py »

genpasswd.py

#!/usr/bin/env python
# ~/bin/genpasswd.py
#   Generate a random password with about
#   142 bits of randomness, making use of
#   /dev/urandom.
# Note:
#   Most online services have somewhat
#   arbitrary rules about what characters
#   can be included in a password. So we
#   limit ourselves to A-Za-z0-9.
# Copyright 2007-2008 Hal Canary
# Dedicated to the Public Domain.
import os, base64
print base64.b64encode(os.urandom(18),'Zz')

Hal Canary | Computers & Code | 2008-01-27 15:54:05 EST
Permanent Link | No Comments

Comments are closed.

Copyright 1997-2007 by Hal Canary.
mailto: h3 at halcanary dot org
xmpp:halcanary@jabber.org
aim:halwcanary
http://halcanary.org