00001 #ifndef SST_DSA_H
00002 #define SST_DSA_H
00003
00004 #include <openssl/dsa.h>
00005
00006 #include "sign.h"
00007
00008 namespace SST {
00009
00010 class DSAKey : public SignKey
00011 {
00012 DSA *dsa;
00013
00014 DSAKey(DSA *dsa);
00015
00016 public:
00017 DSAKey(const QByteArray &key);
00018 DSAKey(int bits);
00019 ~DSAKey();
00020
00021 QByteArray id() const;
00022 QByteArray key(bool getPrivateKey = false) const;
00023
00024 SecureHash *newHash(QObject *parent = NULL) const;
00025
00026 QByteArray sign(const QByteArray &digest) const;
00027 bool verify(const QByteArray &digest, const QByteArray &sig) const;
00028 };
00029
00030 }
00031
00032 #endif // SST_DSA_H