[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 774
  • Last Modified:

MD5 of Unicode TCHAR files

Hi

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
Regards
0
CSecurity
Asked:
CSecurity
  • 2
1 Solution
 
evilrixSenior Software Engineer (Avast)Commented:
A complete example of MD5 implementation can be found here in the appendix
http://www.faqs.org/rfcs/rfc1321.html
0
 
CSecurityAuthor Commented:
I know that, I want MD5 of a UNICODE filename... How to open UNICODE filename and calculate MD5 of it
0
 
evilrixSenior Software Engineer (Avast)Commented:
>> 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.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now