Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MD5 using openssl

MD5 using openssl

Scheduled Pinned Locked Moved C / C++ / MFC
linuxtutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shrims4u
    wrote on last edited by
    #1

    can anyone please tell me how to create the message digest using openssl library in linux.... ????

    S 1 Reply Last reply
    0
    • S shrims4u

      can anyone please tell me how to create the message digest using openssl library in linux.... ????

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Looking at the documentation for MD5 in openssl[^], it looks like it's as simple as calling the MD5 function:

      const char* msg = "This is my message";
      unsigned char digest[MD5_DIGEST_LENGTH];

      MD5(msg, strlen(msg) * sizeof(char), digest);

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      S 1 Reply Last reply
      0
      • S Stuart Dootson

        Looking at the documentation for MD5 in openssl[^], it looks like it's as simple as calling the MD5 function:

        const char* msg = "This is my message";
        unsigned char digest[MD5_DIGEST_LENGTH];

        MD5(msg, strlen(msg) * sizeof(char), digest);

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        S Offline
        S Offline
        shrims4u
        wrote on last edited by
        #3

        Thanx man... I did it but that method is a bit long using the evp.h

        S 1 Reply Last reply
        0
        • S shrims4u

          Thanx man... I did it but that method is a bit long using the evp.h

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          shrims4u wrote:

          that method is a bit long using the evp.h

          Sorry - don't quite follow you there.

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups