-
Notifications
You must be signed in to change notification settings - Fork 0
/
digest-md5.h
42 lines (31 loc) · 851 Bytes
/
digest-md5.h
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
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2009 The Archiveopteryx Developers <[email protected]>
#ifndef DIGESTMD5_H
#define DIGESTMD5_H
#include "mechanism.h"
#include "list.h"
class DigestMD5
: public SaslMechanism
{
public:
DigestMD5( EventHandler * );
EString challenge();
void setChallenge( const EString & );
void parseResponse( const EString & );
void verify();
class Variable
: public Garbage
{
public:
EString name;
EString value() const { return *values.first(); }
bool unique() const { return values.count() == 1; }
bool operator !=( const EString &s ) { return name != s; }
List< EString > values;
};
static bool parse( const EString &s, List< Variable > &l );
private:
class DigestData *d;
private:
void require( class Variable *, const EString & );
};
#endif