diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-21 00:59:21 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-21 01:01:05 (GMT) |
commit | 2c8bfd7c49bd16bebbf0b89c01fce7817afab74f (patch) | |
tree | 1a7c73d4aaf81a1e243ee6f50de0385e9e6a081f /Swiften/SASL/SCRAMSHA1ClientAuthenticator.h | |
parent | fe007f1afdaf29c7ce0302da2984b5611503a822 (diff) | |
download | swift-contrib-2c8bfd7c49bd16bebbf0b89c01fce7817afab74f.zip swift-contrib-2c8bfd7c49bd16bebbf0b89c01fce7817afab74f.tar.bz2 |
Implemented SCRAM-SHA-1 for real now.
Still need to do some cleanup and polishing.
Diffstat (limited to 'Swiften/SASL/SCRAMSHA1ClientAuthenticator.h')
-rw-r--r-- | Swiften/SASL/SCRAMSHA1ClientAuthenticator.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h index 161afd1..ec800cc 100644 --- a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h +++ b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h @@ -1,5 +1,7 @@ #pragma once +#include <map> + #include "Swiften/Base/String.h" #include "Swiften/Base/ByteArray.h" #include "Swiften/SASL/ClientAuthenticator.h" @@ -7,25 +9,25 @@ namespace Swift { class SCRAMSHA1ClientAuthenticator : public ClientAuthenticator { public: - SCRAMSHA1ClientAuthenticator(const ByteArray& nonce); + SCRAMSHA1ClientAuthenticator(const String& nonce); - ByteArray getResponse() const; + ByteArray getResponse(); bool setChallenge(const ByteArray&); private: - ByteArray getInitialClientMessage() const; - ByteArray getSalt() const; - ByteArray getClientVerifier() const; + ByteArray getInitialBareClientMessage() const; + static std::map<char, String> parseMap(const String&); private: enum Step { Initial, Proof } step; - String authcid; - String password; - String authzid; - ByteArray clientnonce; + String clientnonce; ByteArray initialServerMessage; + int iterations; + ByteArray serverNonce; + ByteArray salt; + ByteArray serverSignature; }; } |