Re: a challenge
What about using crypt() and the timestamp? Something like:
#!/usr/local/bin/perl -w
use strict;
my $time = time;
my $salt = 'md'; #mad duck
$time = join('',reverse(split('',$time))); #reverse time because
crypt() only
# deals w/ first 8 chars
print "Localtime: $time\n";
print crypt($time,$salt), "\n";
exit 0;
Just an idea...
ap
----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin@unc.edu - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
On Thu, 18 Oct 2001, martin f krafft wrote:
> goal: a 4-16 byte 7-bit character value that somehow encodes the time
> of creation such that it can be extracted if the encoding scheme/seed
> is known. the encoded value should be such that it is mostly
> impossible to change it so as to yield a later time of creation to be
> encoded. in general, changing the encoded value may well render the
> data invalid.
>
> this is supposed to be a token that's valid for a limited amount of
> time, after which, a new token has to be fetched. this token should
> not be obvious (e.g. the timestamp) to prevent people from changing
> it to be valid longer rather than fetching a new one.
>
> can you do it? or is there a tool out there?
>
> --
> martin; (greetings from the heart of the sun.)
> \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
>
> echo '[dO%O+38%O+PO/d0<0]Fi22os0CC4BA64E418CE7l0xAP'|dc
>
Reply to:
- References:
- a challenge
- From: martin f krafft <madduck@madduck.net>