comp.lang.ada
 help / color / mirror / Atom feed
* Re: MD5 Function in Ada
@ 1997-06-06  0:00 Jerry van Dijk
  0 siblings, 0 replies; 5+ messages in thread
From: Jerry van Dijk @ 1997-06-06  0:00 UTC (permalink / raw)



Jon, long time since C_ECHO :-)

In article <Pine.LNX.3.91.970604091908.3334A-100000@weck.bro jguthrie@brokersys.com writes:

>That's okay.  I actually expected someone to suggest linking in a C source
>file.  As a matter of fact, I have two different MD5 implementations in C
>source (and I could type in the one in APPLIED CRYPTOGRAPHY if I wanted a
>third.) I just don't want to have to figure out how to call C code from
>Ada in order to implement this.

Actually, using GNAT, this doesn't take much figuring out:

   /* interface to 'int do_something(int input) */
   function Do_Something (Input : in Integer) return Integer;
   pragma Import (C, Do_Something, "do_something);

as in GNAT there's a direct correspondence between the Ada and C type's.

If you do not want to rely on this, standard Ada95 with support for
Annex B (Interface to other languages), has the package Interfaces.C
defining them portably (and also have Interfaces.C.Strings and
Interfaces.C.Pointers).

--

-- Jerry van Dijk       | Leiden, Holland
-- Consultant           | Team Ada
-- Ordina Finance       | jdijk@acm.org




^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <199706041300.JAA27378@acmey.gatech.edu>]
* MD5 Function in Ada
@ 1997-06-03  0:00 Jonathan Guthrie
  1997-06-04  0:00 ` Rolf Ebert
  1997-06-05  0:00 ` Anne & Bill Pritchett
  0 siblings, 2 replies; 5+ messages in thread
From: Jonathan Guthrie @ 1997-06-03  0:00 UTC (permalink / raw)



Is there any available source for calculating MD5 hashes in Ada?

-- 
Jonathan Guthrie (jguthrie@brokersys.com)
Information Broker Systems   +281-895-8101   http://www.brokersys.com/
12703 Veterans Memorial #106, Houston, TX  77014, USA

We sell Internet access and commercial Web space.  We also are general
network consultants in the greater Houston area.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-06-06  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-06  0:00 MD5 Function in Ada Jerry van Dijk
     [not found] <199706041300.JAA27378@acmey.gatech.edu>
1997-06-04  0:00 ` Jonathan Guthrie
  -- strict thread matches above, loose matches on Subject: below --
1997-06-03  0:00 Jonathan Guthrie
1997-06-04  0:00 ` Rolf Ebert
1997-06-05  0:00 ` Anne & Bill Pritchett

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