Re: MD5 algorithm
From: Bart Martens (bart.martens@advalvas.be)Date: 03/29/02
- Next message: RainbowHat: "Re: ssh 1.2.1 Root compromise"
- Previous message: Magus: "SEND ME SOME EMAILS PLEASE"
- In reply to: dwij: "MD5 algorithm"
- Next in thread: Wojtek Walczak: "Re: MD5 algorithm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: bart.martens@advalvas.be (Bart Martens) Date: Fri, 29 Mar 2002 10:52:36 GMT
In article <41592f37.0203280257.6eb934eb@posting.google.com>, dwij wrote:
> hi
> i want to encode a string using MD5 algorithm.
> can anybody give me the code.
> what are the header files needed?
>
> in my programme:
>
> #include <md5global.h>
> #include <openssl/md5.h>
>
> main()
> {
> const unsigned char *d = "password";
> unsigned char *md;
> unsigned long n;
> MD5_CTX *c;
> MD5_Init(c);
> MD5_Final(md,c);
> md = (unsigned char *)malloc(100);
> MD5(d,n,md);
> printf("%s",md);
> }
>
>
> i am getting error like undefined reference to MD5 even though i have
> use the command gcc -lmd5 ... to compile.
>
> dwij
If I were you, then I'd use the source code of md5sum. It's GPL so it
should be the most obvious first choice. :-)
See http://www.gnu.org/software/textutils/textutils.html or the source
packages of your Linux distribution.
- Next message: RainbowHat: "Re: ssh 1.2.1 Root compromise"
- Previous message: Magus: "SEND ME SOME EMAILS PLEASE"
- In reply to: dwij: "MD5 algorithm"
- Next in thread: Wojtek Walczak: "Re: MD5 algorithm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|