Click here to Skip to main content
15,867,994 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I have a source code in C#, .NET where it converts a string into its equivalent encrypted Base 64 string.

The code is as follows:
C#
string GetBase64MD5Hash(string text)
{
   byte[] bytes = UnicodeEncoding.Unicode.GetBytes(text);
   MD5CryptoServiceProvider hashProvider = new MD5CryptoServiceProvider();
   
   byte[] hash = hashProvider.ComputeHash(inputBytes);
   return Convert.ToBase64String(hash);
}


I need a write a method in C++ which does the same thing.
I found help in internet which considers the default Encoding format and normal encryption. But what i need here is Unicode Encoding and Base 64 format of the hash.

Please provide some help to solve this issue.

Thanks and Regards,
Kishor Reddy
Posted

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900