Re: MD5
From: Bart Martens (bart.martens@advalvas.be)Date: 03/30/02
- Next message: Tom Jones: "Looking for a scanner which can scan a given port (80) and check the output (html) for a given string"
- Previous message: James Wyatt: "SSH and Mandrake 8.2"
- In reply to: dwij: "MD5"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: bart.martens@advalvas.be (Bart Martens) Date: Sat, 30 Mar 2002 21:49:30 GMT
In article <41592f37.0203301214.774eb4a3@posting.google.com>, dwij wrote:
> hi
>
> please explain me the following code.
> does n signifies the length of encoded string.
> is this the correct method to encrypt using MD5 algo.
>
>
> #include <openssl/md5.h>
> #include <stdio.h>
> int i;
> int main(void)
> {
> const unsigned char *d = "password";
> unsigned char md[50];
> unsigned long n= 32;
> MD5_CTX c;
> MD5_Init(&c);
> MD5_Final(md,&c);
> MD5 (d,n,md);
> for(i =0;i < 16 ;i++)
>
> {
> printf("%02x",md[i]);
> }
> printf("\n");
> return 0;
>
> }
>
>
> thx
> Dwij
See the RFC for a reference implementation, or the source code
of GNU md5sum. The code of the MD5-algorithm is very short itself.
http://www.ietf.org/rfc/rfc1321.txt
http://www.gnu.org/software/textutils/textutils.html
- Next message: Tom Jones: "Looking for a scanner which can scan a given port (80) and check the output (html) for a given string"
- Previous message: James Wyatt: "SSH and Mandrake 8.2"
- In reply to: dwij: "MD5"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|