moved typedefs to beginning of files to solve some include problems
splitted authenticator to have a separate implementation for each auth_method_t using va_copy to clone va_lists, should fix proplems on AMD64 some other cleanups
This commit is contained in:
@@ -24,15 +24,14 @@
|
||||
#ifndef HASHER_H_
|
||||
#define HASHER_H_
|
||||
|
||||
typedef enum hash_algorithm_t hash_algorithm_t;
|
||||
typedef struct hasher_t hasher_t;
|
||||
|
||||
#include <types.h>
|
||||
|
||||
|
||||
typedef enum hash_algorithm_t hash_algorithm_t;
|
||||
|
||||
/**
|
||||
* @brief Algorithms to use for hashing.
|
||||
*
|
||||
*
|
||||
* Currently only the following algorithms are implemented:
|
||||
* - HASH_MD5
|
||||
* - HASH_SHA1
|
||||
@@ -70,8 +69,6 @@ enum hash_algorithm_t {
|
||||
extern enum_name_t *hash_algorithm_names;
|
||||
|
||||
|
||||
typedef struct hasher_t hasher_t;
|
||||
|
||||
/**
|
||||
* @brief Generic interface for all hash functions.
|
||||
*
|
||||
|
||||
@@ -24,21 +24,20 @@
|
||||
#ifndef MD5_HASHER_H_
|
||||
#define MD5_HASHER_H_
|
||||
|
||||
#include <crypto/hashers/hasher.h>
|
||||
|
||||
|
||||
typedef struct md5_hasher_t md5_hasher_t;
|
||||
|
||||
#include <crypto/hashers/hasher.h>
|
||||
|
||||
/**
|
||||
* @brief Implementation of hasher_t interface using the
|
||||
* MD5 algorithm.
|
||||
*
|
||||
*
|
||||
* @b Constructors:
|
||||
* - hasher_create() using HASH_MD5 as algorithm
|
||||
* - md5_hasher_create()
|
||||
*
|
||||
*
|
||||
* @see hasher_t
|
||||
*
|
||||
*
|
||||
* @ingroup hashers
|
||||
*/
|
||||
struct md5_hasher_t {
|
||||
|
||||
@@ -24,11 +24,10 @@
|
||||
#ifndef SHA1_HASHER_H_
|
||||
#define SHA1_HASHER_H_
|
||||
|
||||
#include <crypto/hashers/hasher.h>
|
||||
|
||||
|
||||
typedef struct sha1_hasher_t sha1_hasher_t;
|
||||
|
||||
#include <crypto/hashers/hasher.h>
|
||||
|
||||
/**
|
||||
* @brief Implementation of hasher_t interface using the
|
||||
* SHA1 algorithm.
|
||||
|
||||
@@ -23,21 +23,20 @@
|
||||
#ifndef SHA2_HASHER_H_
|
||||
#define SHA2_HASHER_H_
|
||||
|
||||
#include <crypto/hashers/hasher.h>
|
||||
|
||||
|
||||
typedef struct sha2_hasher_t sha2_hasher_t;
|
||||
|
||||
#include <crypto/hashers/hasher.h>
|
||||
|
||||
/**
|
||||
* @brief Implementation of hasher_t interface using the SHA2 algorithms.
|
||||
*
|
||||
*
|
||||
* SHA2 is an other name for the SHA-256, SHA-384 and SHA-512 variants of
|
||||
* the SHA hash algorithm.
|
||||
*
|
||||
*
|
||||
* @b Constructors:
|
||||
* - hasher_create() using HASH_SHA256, HASH_SHA384 or HASH_SHA512 as algorithm
|
||||
* - sha2_hasher_create()
|
||||
*
|
||||
*
|
||||
* @see hasher_t
|
||||
*
|
||||
* @ingroup hashers
|
||||
|
||||
Reference in New Issue
Block a user