Creating MD5 hashs?

This is a discussion on Creating MD5 hashs? within the C++ Programming forums, part of the General Programming Boards category; is there a simple way to make MD5 hashs in c++? i know there is in languages like php is ...

  1. #1
    Registered Abuser Loic's Avatar
    Join Date
    Mar 2007
    Location
    Sydney
    Posts
    115

    Creating MD5 hashs?

    is there a simple way to make MD5 hashs in c++? i know there is in languages like php

    is there a simple way to do it? or would i have to use an algorithm?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,910
    MD5 is an algorithm. There is no standard MD5 hash function, but you can use a cryptographic library such as Botan or Crypto++, or implement it yourself.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered Abuser Loic's Avatar
    Join Date
    Mar 2007
    Location
    Sydney
    Posts
    115
    Thanks, from what i can see from those Botan or Crypto++, sites thats what i am looking for... Cheers

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,910
    Incidentally, you might want to note that MD5 is classified by Crypto++ as being an "insecure or obsolescent algorithms retained for backwards compatibility and historical value".
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    But it's not really used for security too much anyway (besides web applications), usually it's just used as a checksum for file or string integrity.
    Last edited by zacs7; 07-13-2007 at 01:41 AM.

  6. #6
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,249
    Quote Originally Posted by Loic View Post
    is there a simple way to make MD5 hashs in c++? i know there is in languages like php

    is there a simple way to do it? or would i have to use an algorithm?
    Search the web for "md5.c". Look for the implementation by L. Peter Deutsch. This implementation of MD5 is free, very solid, and easy to use. Get the accompanying md5.h file along with it.

    You should find it all over the place -- it's used everywhere.

  7. #7
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,249
    Quote Originally Posted by zacs7 View Post
    But it's not really used for security too much anyway (besides web applications), usually it's just used as a checksum for file or string integrity.
    Actually, MD5 is one of the standardized hash functions used for fingerprinting of X.509 certificates (think SSL). It was invented as a cryptographic hash, not a file checksumming algorithm.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Compare running programs' MD5 and terminate
    By ferenczi in forum C Programming
    Replies: 3
    Last Post: 02-08-2008, 01:56 PM
  3. File send app - md5 checksum different when load is put on server.
    By (Slith++) in forum Networking/Device Communication
    Replies: 5
    Last Post: 12-31-2007, 12:23 PM
  4. Some questions concerning smp and md5
    By keira in forum C Programming
    Replies: 6
    Last Post: 08-31-2007, 03:03 PM
  5. MD5 Algorithm
    By Inquirer in forum C Programming
    Replies: 2
    Last Post: 12-28-2003, 10:55 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21