summaryrefslogtreecommitdiff
path: root/src/auth_algo.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-04 23:58:43 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-04 23:58:43 +0000
commit78ffdffce74c10faf0c23bc5256486c6bda795c4 (patch)
tree3d7f6bb6986fba5ff4de077aa4844733cb412b87 /src/auth_algo.h
parentremoved useless gcry_strsource output (diff)
cleaned up auth algo
Diffstat (limited to 'src/auth_algo.h')
-rw-r--r--src/auth_algo.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/auth_algo.h b/src/auth_algo.h
index b22ea46..f77ae75 100644
--- a/src/auth_algo.h
+++ b/src/auth_algo.h
@@ -44,7 +44,7 @@ typedef enum auth_algo_type_enum auth_algo_type_t;
struct auth_algo_struct {
auth_algo_type_t type_;
buffer_t key_;
- gcry_md_hd_t handle_;
+ void* params_;
};
typedef struct auth_algo_struct auth_algo_t;
@@ -54,7 +54,14 @@ void auth_algo_close(auth_algo_t* aa);
void auth_algo_generate(auth_algo_t* aa, key_derivation_t* kd, encrypted_packet_t* packet);
int auth_algo_check_tag(auth_algo_t* aa, key_derivation_t* kd, encrypted_packet_t* packet);
+
#define SHA1_LENGTH 20
+
+struct auth_algo_sha1_param_struct {
+ gcry_md_hd_t handle_;
+};
+typedef struct auth_algo_sha1_param_struct auth_algo_sha1_param_t;
+
int auth_algo_sha1_init(auth_algo_t* aa);
void auth_algo_sha1_close(auth_algo_t* aa);
void auth_algo_sha1_generate(auth_algo_t* aa, key_derivation_t* kd, encrypted_packet_t* packet);