在Base 64字符串中获取MD5哈希(VC ++) [英] Get MD5 Hash in Base 64 String (VC++)

查看:84
本文介绍了在Base 64字符串中获取MD5哈希(VC ++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在C#,.NET中有一个源代码,它将字符串转换为等效的加密Base 64字符串。



代码如下:

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:

string GetBase64MD5Hash(string text)
{
   byte[] bytes = UnicodeEncoding.Unicode.GetBytes(text);
   MD5CryptoServiceProvider hashProvider = new MD5CryptoServiceProvider();
   
   byte[] hash = hashProvider.ComputeHash(inputBytes);
   return Convert.ToBase64String(hash);
}





我需要用C ++编写一个方法来做同样的事情。

我在互联网上找到了帮助,它考虑了默认的编码格式和普通加密。但我需要的是Unicode编码和Base 64格式的哈希。



请提供一些帮助来解决这个问题。



谢谢和问候,

Kishor Reddy



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

推荐答案

参见https://www.google.com/search?q=md5%20c%2B%2B [ ^ ]。


这个问题的解决方案可以在这里找到....



https://social.msdn.microsoft.com/Forums/vstudio / en-US / dde366fe-7510-4371-92d6-7098e08e57d7 / get-md5-hash-in-base-64-string-vc?forum = vcgeneral [ ^ ]
The solution for this issue can be found here....

https://social.msdn.microsoft.com/Forums/vstudio/en-US/dde366fe-7510-4371-92d6-7098e08e57d7/get-md5-hash-in-base-64-string-vc?forum=vcgeneral[^]


这篇关于在Base 64字符串中获取MD5哈希(VC ++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆