2005-11-21 16:26:36 +00:00
|
|
|
/**
|
2005-11-27 14:04:16 +00:00
|
|
|
* @file sha1_hasher.h
|
2005-11-21 16:26:36 +00:00
|
|
|
*
|
2005-11-27 14:04:16 +00:00
|
|
|
* @brief Interface of sha1_hasher_t
|
2005-11-21 16:26:36 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2005 Jan Hutter, Martin Willi
|
|
|
|
* Hochschule fuer Technik Rapperswil
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
|
|
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
2005-11-27 14:04:16 +00:00
|
|
|
#ifndef SHA1_HASHER_H_
|
|
|
|
#define SHA1_HASHER_H_
|
2005-11-21 16:26:36 +00:00
|
|
|
|
2006-04-05 12:10:50 +00:00
|
|
|
#include <crypto/hashers/hasher.h>
|
2005-11-21 16:26:36 +00:00
|
|
|
|
|
|
|
|
2005-11-27 14:04:16 +00:00
|
|
|
typedef struct sha1_hasher_t sha1_hasher_t;
|
2005-11-24 11:30:19 +00:00
|
|
|
|
2005-11-21 16:26:36 +00:00
|
|
|
/**
|
2005-11-24 16:22:04 +00:00
|
|
|
* @brief Implementation of hasher_t interface using the
|
|
|
|
* SHA1 algorithm.
|
2005-11-21 16:26:36 +00:00
|
|
|
*
|
2005-12-04 14:45:57 +00:00
|
|
|
* @b Constructors:
|
2005-12-06 15:37:56 +00:00
|
|
|
* - hasher_create() using HASH_SHA1 as algorithm
|
2005-12-04 14:45:57 +00:00
|
|
|
* - sha1_hasher_create()
|
|
|
|
*
|
|
|
|
* @see hasher_t
|
|
|
|
*
|
2005-11-24 16:22:04 +00:00
|
|
|
* @ingroup hashers
|
2005-11-21 16:26:36 +00:00
|
|
|
*/
|
2005-11-27 14:04:16 +00:00
|
|
|
struct sha1_hasher_t {
|
2005-11-21 16:26:36 +00:00
|
|
|
|
|
|
|
/**
|
2005-12-06 15:37:56 +00:00
|
|
|
* Generic hasher_t interface for this hasher.
|
2005-11-21 16:26:36 +00:00
|
|
|
*/
|
|
|
|
hasher_t hasher_interface;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2005-11-27 14:04:16 +00:00
|
|
|
* @brief Creates a new sha1_hasher_t.
|
2005-11-21 16:26:36 +00:00
|
|
|
*
|
2005-11-28 20:29:47 +00:00
|
|
|
* @return sha1_hasher_t object
|
2005-11-24 16:22:04 +00:00
|
|
|
*
|
|
|
|
* @ingroup hashers
|
2005-11-21 16:26:36 +00:00
|
|
|
*/
|
2006-05-09 07:34:25 +00:00
|
|
|
sha1_hasher_t *sha1_hasher_create(void);
|
2005-11-21 16:26:36 +00:00
|
|
|
|
2005-11-27 14:04:16 +00:00
|
|
|
#endif /*SHA1_HASHER_H_*/
|