Voder-Vocoder

The Log of Hal Canary

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

« …Or Chronoliths apeared on the beach…. | the library again? »

otpasswd

#!/usr/bin/perl
## otpasswd --- One Time Passwd
## Generate a random password unsuitable
## for memorization.
## Example output: 2HPxfca3W2tDAPPrhFw8
## Copyright 2006 Hal Canary
## DTPD (Dedicated to the Public Domain)
use strict;
use warnings;
foreach my $x (0 .. 19) {
	my $num = int(rand(62));
	if ($num < 10) {
		$num += 48;
	} elsif ($num < 36) {
		$num += (65-10);
	} else {
		$num += (97-36);
	}
	printf("%c",$num);
}
print "\n";

Hal Canary | Computers & Code | 2006-09-03 12:57:58 EDT
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