2003-07-02 03:34:11 +00:00
|
|
|
#ifndef QCAPROVIDER_H
|
|
|
|
#define QCAPROVIDER_H
|
|
|
|
|
2003-07-02 17:38:03 +00:00
|
|
|
#include<qglobal.h>
|
2003-07-02 03:34:11 +00:00
|
|
|
#include"qca.h"
|
|
|
|
|
2003-07-02 17:38:03 +00:00
|
|
|
#ifdef Q_WS_WIN
|
|
|
|
#define QCA_EXPORT extern "C" __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define QCA_EXPORT extern "C"
|
|
|
|
#endif
|
|
|
|
|
2003-07-02 03:34:11 +00:00
|
|
|
class QCAProvider
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
QCAProvider() {}
|
|
|
|
virtual ~QCAProvider() {}
|
|
|
|
|
|
|
|
virtual int capabilities() const=0;
|
2003-07-02 16:46:10 +00:00
|
|
|
virtual void *functions(int cap)=0;
|
|
|
|
};
|
2003-07-02 03:34:11 +00:00
|
|
|
|
2003-07-02 16:46:10 +00:00
|
|
|
struct QCA_SHA1Functions
|
|
|
|
{
|
|
|
|
int (*create)();
|
|
|
|
void (*destroy)(int ctx);
|
|
|
|
void (*update)(int ctx, const char *in, unsigned int len);
|
|
|
|
void (*final)(int ctx, char *out); // 20 bytes output
|
2003-07-02 03:34:11 +00:00
|
|
|
};
|
|
|
|
|
2003-07-03 02:23:29 +00:00
|
|
|
struct QCA_MD5Functions
|
|
|
|
{
|
|
|
|
int (*create)();
|
|
|
|
void (*destroy)(int ctx);
|
|
|
|
void (*update)(int ctx, const char *in, unsigned int len);
|
|
|
|
void (*final)(int ctx, char *out); // 16 bytes output
|
|
|
|
};
|
|
|
|
|
2003-07-02 03:34:11 +00:00
|
|
|
#endif
|