summaryrefslogtreecommitdiffabout
path: root/include/opkele/types.h
Unidiff
Diffstat (limited to 'include/opkele/types.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/types.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/opkele/types.h b/include/opkele/types.h
index ba06776..757c0af 100644
--- a/include/opkele/types.h
+++ b/include/opkele/types.h
@@ -1,49 +1,46 @@
1#ifndef __OPKELE_TYPES_H 1#ifndef __OPKELE_TYPES_H
2#define __OPKELE_TYPES_H 2#define __OPKELE_TYPES_H
3 3
4/** 4/**
5 * @file 5 * @file
6 * @brief various types declarations 6 * @brief various types declarations
7 */ 7 */
8 8
9#include <ostream> 9#include <ostream>
10#include <vector> 10#include <vector>
11#include <string> 11#include <string>
12#include <map> 12#include <map>
13#include <memory> 13#include <memory>
14 14
15/**
16 * @brief the main opkele namespace
17 */
18namespace opkele { 15namespace opkele {
19 using std::vector; 16 using std::vector;
20 using std::string; 17 using std::string;
21 using std::map; 18 using std::map;
22 using std::ostream; 19 using std::ostream;
23 using std::auto_ptr; 20 using std::auto_ptr;
24 21
25 /** 22 /**
26 * the OpenID operation mode 23 * the OpenID operation mode
27 */ 24 */
28 typedef enum _mode_t { 25 typedef enum _mode_t {
29 mode_associate, 26 mode_associate,
30 mode_checkid_immediate, 27 mode_checkid_immediate,
31 mode_checkid_setup, 28 mode_checkid_setup,
32 mode_check_association 29 mode_check_association
33 } mode_t; 30 } mode_t;
34 31
35 /** 32 /**
36 * the association secret container 33 * the association secret container
37 */ 34 */
38 class secret_t : public vector<unsigned char> { 35 class secret_t : public vector<unsigned char> {
39 public: 36 public:
40 37
41 /** 38 /**
42 * xor the secret and hmac together and encode, using base64 39 * xor the secret and hmac together and encode, using base64
43 * @param key_sha1 pointer to the sha1 digest 40 * @param key_sha1 pointer to the sha1 digest
44 * @param rv reference to the return value 41 * @param rv reference to the return value
45 */ 42 */
46 void enxor_to_base64(const unsigned char *key_sha1,string& rv) const; 43 void enxor_to_base64(const unsigned char *key_sha1,string& rv) const;
47 /** 44 /**
48 * decode base64-encoded secret and xor it with the sha1 digest 45 * decode base64-encoded secret and xor it with the sha1 digest
49 * @param key_sha1 pointer to the message digest 46 * @param key_sha1 pointer to the message digest