MD5 of Unicode TCHAR files

Posted on 2009-04-25
Last Modified: 2012-05-06

I have a file which is unicode...

I want an example of code which will calculate MD5 of this Unicode file in C++

Please advice
Question by:CSecurity
    LVL 39

    Accepted Solution

    A complete example of MD5 implementation can be found here in the appendix
    LVL 17

    Author Comment

    I know that, I want MD5 of a UNICODE filename... How to open UNICODE filename and calculate MD5 of it
    LVL 39

    Expert Comment

    >> I know that, I want MD5 of a UNICODE filename... How to open UNICODE filename and calculate MD5 of it
    You mean calculate it for the whole file?

    Just open it as a binary file and ready it in as bytes and then pass the bytes through the MD5 API. Once all the bytes have been passed through you'll have the MD5 value. If you mean the filename, you just to the same thing. the API allows you to process chunks of data at a time, so you just need to read the file in chunks and process it through the API.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Some Windows API functions expect you to provide a pointer to a CALLBACK function that the system will need to call as part of the operation.  Such API functions as SetTimer, timeSetEvent, CreateThread, EnumWindows, LineDDA, even window message hand…
    Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
    The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now