Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: nmm1@cus.cam.ac.uk (Nick Maclaren)
Subject: Re: MD5 implementation
Date: 1996/01/11	[thread overview]
Message-ID: <4d40un$373@lyra.csx.cam.ac.uk> (raw)
In-Reply-To: 4d3usa$gfm@nntpd2.cxo.dec.com

In article <4d3usa$gfm@nntpd2.cxo.dec.com>,
Michael Spratte <spratte@odette.cxo.dec.com> wrote:
>
>In article <30F4CCAF.41C6@adv.magwien.gv.at>, Michael Gsandtner <gsa@adv.magwien.gv.at> writes:
>|>Where can I get a MD5 (rfc1321) encryption implementation for a
>|>64 Bit alpha running DEC/OSF1 ?
>|>The reference implementation included in the RFC works fine only 
>|>on 32 Bit machines.
>
>I've had no problem with the RFC1321 code running on Digital UNIX.  All
>I did was modify global.h:
>
>/* UINT4 defines a four byte word */
>#if defined(__osf__) && defined(__alpha)
>typedef unsigned int UINT4;
>#else
>typedef unsigned long int UINT4;
>#endif
>
>With this modification, the code works identically on ULTRIX, OpenVMS,
>Digital UNIX, and Windows NT.

I am sorry to say that I think that this is a revolting solution!
It isn't difficult to do the job properly (i.e. without any #ifs
that depend on any particular system).  For such code, see
/pub/software/programs/checksum/... on cus.cam.ac.uk.

Yes, that code has #ifs that fix up SunOS (no EXIT_SUCCESS etc.)
and has alternate code for POSIX/UNIX systems (to allow its use in
a pipe).  But otherwise it works without #ifs under OS/2, MVS and
many UNICES (including DEC OSF/1).

If it doesn't, please tell me and I shall regard it as a bug.


Nick Maclaren,
University of Cambridge Computer Laboratory,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679



  reply	other threads:[~1996-01-11  5:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-01-11  5:00 MD5 implementation Michael Gsandtner
1996-01-11  5:00 ` Pierre Vassellerie
1996-01-11  5:00 ` Mike Iglesias
1996-01-11  5:00 ` Michael Spratte
1996-01-11  5:00   ` Nick Maclaren [this message]
1996-01-12  5:00   ` Donn Cave
1996-01-12  5:00   ` Michael Gsandtner
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox