main.cpp
#include <QtCrypto>
#include <QtDebug>
#include <stdio.h>
#include <QApplication>
int main(int argc, char **argv)
{
QCA::init();
char ca[1024]="abcdefg";
if(!QCA::isSupported("md5")) printf("SHA1 not supported!\n");
else printf("SHA1 supported.\n");
QCA::Hash shaHash("sha1");
qDebug()<<shaHash.type();
shaHash.update(ca, 7);
return app.exec();
}
#include <QtCrypto>
#include <QtDebug>
#include <stdio.h>
#include <QApplication>
int main(int argc, char **argv)
{
QCA::init();
QApplication app(argc, argv);
char ca[1024]="abcdefg";
if(!QCA::isSupported("md5")) printf("SHA1 not supported!\n");
else printf("SHA1 supported.\n");
QCA::Hash shaHash("sha1");
qDebug()<<shaHash.type();
shaHash.update(ca, 7);
return app.exec();
}
To copy to clipboard, switch view to plain text mode
.pro
######################################################################
# Automatically generated by qmake (2.01a) ??*???? 16. ???? 23:25:30 2010
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
SOURCES += main.cpp
CONFIG+=crypto
CONFIG+=console
######################################################################
# Automatically generated by qmake (2.01a) ??*???? 16. ???? 23:25:30 2010
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
SOURCES += main.cpp
CONFIG+=crypto
CONFIG+=console
To copy to clipboard, switch view to plain text mode
Bookmarks