qt md5加密,base64编码解码

qt md5加密,base64编码解码

md5加密

QByteArray data = "12121221";
data += "asdfas";
QByteArray rels = QCryptographicHash::hash(data, QCryptographicHash::Md5);
qDebug() << rels;
qDebug() << rels.toHex();

base64编码解码

QByteArray base = "你好d,fあいうえおaa";
//base64编码
base = base.toBase64();
qDebug() << base;
//base64解码
base = QByteArray::fromBase64(base);
qDebug() << base.data();

c/c++ 学习互助QQ群:877684253

本人微信:xiaoshitou5854

posted @ 2019-09-11 10:32  小石王  阅读(1205)  评论(0编辑  收藏  举报