lkml.org 
[lkml]   [2000]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [OFFTOPIC]Re: FW: Crypto

All this talk and no code :) well heres a toy from Perry E. Metzger that
you all will like.

/*
* RSA patent countdown clock.
* Written March 11, 1998 by Perry E. Metzger
* Public Domain -- This code has no copyright, do anything you like
* to it, though it would be friendly if you gave me credit somewhere.
*/


Chipper

On Thu, 3 Aug 2000, David Woodhouse wrote:

>
>dax@gurulabs.com said:
>> The RSA patent doesn't expire until Sept 20th. We still have 49
>> days, 7 hours and 39 minutes to go. :)
>
>Actually, I believe it's not clear on which day it actually expires - it
>could be the 20th, or it could be the 21st. There are legal precedents for
>either.
>
>Which timezone is it in, anyway?
>
>(Information obtained from the bottom of
> http://lwn.net/2000/0727/backpage.php3 )
>
>
>
>--
>dwmw2
>
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.rutgers.edu
>Please read the FAQ at http://www.tux.org/lkml/
>

------
Please encrypt anything important.
PGP Key: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x6CFA486D
/*
* RSA patent countdown clock.
* Written March 11, 1998 by Perry E. Metzger
* Public Domain -- This code has no copyright, do anything you like
* to it, though it would be friendly if you gave me credit somewhere.
*/
#include <stdio.h>
#include <time.h>
#include <sys/time.h>

#define SECSPERDAY (24 * 60 * 60)

int
main(int argc, char **argv)

{
struct tm patexp_tm;
time_t exptime, nowtime, diff;
int days;

/*
* should we set the timezone? Which one? Does the patent
* expire at 00:00 on the 20'th, or at 00:00 on the 21st?
*/
patexp_tm.tm_sec = 0;
patexp_tm.tm_min = 0;
patexp_tm.tm_hour = 0;
patexp_tm.tm_mday = 20;
patexp_tm.tm_mon = 8; /* This is Sept., not Aug. */
patexp_tm.tm_year = 100;

exptime = mktime(&patexp_tm);
nowtime = time(NULL);

printf("Today is:\t\t%s", ctime(&nowtime));
printf("RSA patent expires:\t%s", ctime(&exptime));

diff = exptime - nowtime;
days = diff / SECSPERDAY;

printf("There are now %d days left until expiry\n", days);
}


\
 
 \ /
  Last update: 2005-03-22 13:58    [W:1.866 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site