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

Re: C source



On Fri, Jul 15, 2016 at 12:07:09PM +0200, Pol Hallen wrote:
> alice.c:50:18: error: unknown type name ‘md5_context’
>  void md5_starts( md5_context *ctx )

These aren't typedefs used by openssl.  It looks like your code
is designed to be used with a completely different md5.h.

FWIW, last time I wanted to do md5 in C, I copied the code into my own
project. I got it from the source to dpkg, which did the same thing.

https://github.com/chocolate-doom/chocolate-doom/commit/09180d3f73e522c1e0c43993aec28cf339dcf74d#diff-2fd6f21ae40fa979b9535d9f78ae4f0d

> alice.c:61:37: error: unknown type name ‘uint8’
>  void md5_process( md5_context *ctx, uint8 data[64] )
>                                      ^

This code must rely on some header or library defining a bunch of integer
types. uint8 is clearly meant to be an unsigned char. There's a standard
header <inttypes.h> that gives you uint8_t and friends, but not without
the _t suffix.  inttypes.h is part of the ISO C99 standard and perhaps
others.

You need to find out what the actual dependencies of the code you are
trying to compile.

-- 
Jonathan Dowland
Please do not CC me, I am subscribed to the list.

Attachment: signature.asc
Description: Digital signature


Reply to: