diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-19 20:54:01 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-19 20:54:20 (GMT) |
commit | 250ede4f32a14f566fbafd634e2024c93677cf19 (patch) | |
tree | 7e09ea5c685e046145d5f238409af235798a85f1 /Swiften/SASL/SCRAMSHA1ClientAuthenticator.h | |
parent | 1e4a5816db5178b535a4405dd54df4c95491810f (diff) | |
download | swift-contrib-250ede4f32a14f566fbafd634e2024c93677cf19.zip swift-contrib-250ede4f32a14f566fbafd634e2024c93677cf19.tar.bz2 |
Added missing files of previous commit.
Diffstat (limited to 'Swiften/SASL/SCRAMSHA1ClientAuthenticator.h')
-rw-r--r-- | Swiften/SASL/SCRAMSHA1ClientAuthenticator.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h new file mode 100644 index 0000000..d129468 --- /dev/null +++ b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h @@ -0,0 +1,30 @@ +#pragma once + +#include "Swiften/Base/String.h" +#include "Swiften/Base/ByteArray.h" + +namespace Swift { + class SCRAMSHA1ClientAuthenticator { + public: + SCRAMSHA1ClientAuthenticator(const String& authcid, const String& password, const String& authzid, const ByteArray& nonce); + + ByteArray getMessage() const; + bool setResponse(const ByteArray&); + + private: + ByteArray getInitialClientMessage() const; + ByteArray getSalt() const; + ByteArray getClientVerifier() const; + + private: + enum Step { + Initial, + Proof + } step; + String authcid; + String password; + String authzid; + ByteArray clientnonce; + ByteArray initialServerMessage; + }; +} |