From 78ffdffce74c10faf0c23bc5256486c6bda795c4 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 4 Jan 2009 23:58:43 +0000 Subject: cleaned up auth algo --- src/auth_algo.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/auth_algo.h') 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); -- cgit v1.2.3