blob: d12946860d6e12d8cdbcda7e408e6ec94feb670f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
};
}
|