哈希字符串md5 [英] hashing a string md5

查看:76
本文介绍了哈希字符串md5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
请问我是否有IMEI,并想将其哈希为MD5
我正在使用qt
请帮忙
在此先感谢.

hey all,
please i am having an IMEI and want to hash it as MD5
I am using qt
please help
Thanks in Advance.

推荐答案

您是否看过 ^ ]

Well have you looked at QCryptographicHash::hash[^]

QString encodedPass = QString(QCryptographicHash::hash(("my string"),QCryptographicHash::Md5));



请记住,Qt返回二进制,如果您需要十六进制格式,请使用 QByteArray :: toHex. [ ^ ]



Remember Qt returns binary, if you need it in Hex format use QByteArray::toHex.[^]


在Qt 4.3或更高版本中,您可以使用 QCryptographicHash [
In Qt 4.3 or later you can use the QCryptographicHash[^] class.


这篇关于哈希字符串md5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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