mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-26 19:44:32 +00:00
KeyLength is a cool idea, but I found I needed to say "any key length
is OK" too often. So a default. svn path=/trunk/kdesupport/qca/; revision=361645
This commit is contained in:
parent
98116b4282
commit
04aea63efe
@ -27,6 +27,8 @@
|
||||
#include <qhostaddress.h>
|
||||
#include "qca.h"
|
||||
|
||||
#include <limits>
|
||||
|
||||
#define QCA_PLUGIN_VERSION 2
|
||||
|
||||
#define QCA_EXPORT_PLUGIN(P) \
|
||||
@ -73,6 +75,16 @@ public:
|
||||
|
||||
virtual void update(const QSecureArray &in) = 0;
|
||||
virtual void final(QSecureArray *out) = 0;
|
||||
protected:
|
||||
KeyLength anyKeyLength() const
|
||||
{
|
||||
// this is used instead of a default implementation to make sure that
|
||||
// provider authors think about it, at least a bit.
|
||||
// See Meyers, Effective C++, Effective C++ (2nd Ed), Item 36
|
||||
return KeyLength( 0, std::numeric_limits<int>::max(), 1 );
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
class PKeyBase : public Provider::Context
|
||||
|
Loading…
x
Reference in New Issue
Block a user