The code below shows how to use the QCA::Hash class
#include <QtCrypto>
#include <QCoreApplication>
#include <stdio.h>
#ifdef QT_STATICPLUGIN
#include "import_plugins.h"
#endif
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
printf("SHA1 not supported!\n");
else {
printf(
"sha1(\"%s\") = [%s]\n", arg.
data(), qPrintable(result));
}
printf("MD5 not supported!\n");
else {
hashObject.update(part1);
hashObject.update(part2);
printf(
"md5(\"%s\") = [%s]\n", arg.
data(), qPrintable(result));
}
return 0;
}