#!/usr/bin/perl -w

use strict;
use Digest::MD5 qw/md5_hex/;

@ARGV > 1 or die <<"USAGE";

$0 <seed> <length>

generate Wep key with MD5 digest of <seed> truncated to <length> characters
USAGE

print uc substr md5_hex(shift), 0, shift;

=head1 NAME

B<wep.pl> <seed> <length>

=head1 DESCRIPTION

Generate Wep key with MD5 digest of <seed> truncated to <length> characters.

=head1 COPYRIGHT

Copyright 2000-2007 Etienne LEMEE <coding AT etilem DOT net>

This piece of code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

=cut
