[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] looking for a DES build



On Wed, 10 Feb 1999, Marta Kreps wrote:

> Has anyone out there already built the Perl module
> Crypt::DES from CPAN's Crypt-DES-1.0.tar.gz for 
> PowerPC and 68K?  (If just for PPC, I would still be interested.)

I took a look at this one this evening, and it strikes me that the real
question is, has anyone built it for these _architectures_?

Tweaking the source to compile and link under MacOS isn't too bad. You
need to rename des.c because DES.xs is going to produce DES.c, which leads
to a filename conflict. That's one. Also, in des.h, the 'machine/types.h'
is obviously expected to supply typedefs for things like u_int8_t and so
forth. Matthias does actually have a 'machine/types.h' in
MacPerl_Src:GUSI:includes', but it's meant for other purposes and doesn't
have these things. But you can just throw the typedefs in explicitly,
where u_int8_t is 'unsigned char' and 'u_int32_t' is 'unsigned long'. And
I think you want to put in sys/types.h from GUSI to get u_long.

After that it builds, but it fails out on tests 3 and 4, the decrypt() and
encrypt() methods (basically the whole ball of wax). These same tests fail
on MkLinux, so I'm guessing some of the magic numbers or other procedures
in des_crypt() in des.c just aren't appropriate for the PPC chip.

Someone who knows DES well would have to look at the source. I mean, it
could be something really simple, too, but my gut hunch is that it isn't.

I'm wondering if Paul Schinder gets the same results when testing this on
LinuxPPC?

Arved



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch