removed trailing spaces ([[:space:]]+$)

This commit is contained in:
Martin Willi
2009-09-04 13:46:09 +02:00
parent 7d1b030446
commit 7daf5226b7
703 changed files with 10633 additions and 10633 deletions
+12 -12
View File
@@ -2,9 +2,9 @@
* Copyright (C) 2005-2006 Martin Willi
* Copyright (C) 2005 Jan Hutter
* Hochschule fuer Technik Rapperswil
* Copyright (C) 1990-1992, RSA Data Security, Inc. Created 1990.
* Copyright (C) 1990-1992, RSA Data Security, Inc. Created 1990.
* All rights reserved.
*
*
* Derived from the RSA Data Security, Inc. MD4 Message-Digest Algorithm.
* Ported to fulfill hasher_t interface.
*
@@ -83,7 +83,7 @@ struct private_md4_hasher_t {
* Public interface for this hasher.
*/
md4_hasher_t public;
/*
* State of the hasher.
*/
@@ -101,7 +101,7 @@ static void Encode (u_int8_t *output, u_int32_t *input, size_t len)
{
size_t i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
for (i = 0, j = 0; j < len; i++, j += 4)
{
output[j] = (u_int8_t)(input[i] & 0xff);
output[j+1] = (u_int8_t)((input[i] >> 8) & 0xff);
@@ -220,7 +220,7 @@ static void MD4Update(private_md4_hasher_t *this, u_int8_t *input, size_t inputL
partLen = 64 - index;
/* Transform as many times as possible. */
if (inputLen >= partLen)
if (inputLen >= partLen)
{
memcpy(&this->buffer[index], input, partLen);
MD4Transform (this->state, this->buffer);
@@ -288,7 +288,7 @@ static void get_hash(private_md4_hasher_t *this, chunk_t chunk, u_int8_t *buffer
static void allocate_hash(private_md4_hasher_t *this, chunk_t chunk, chunk_t *hash)
{
chunk_t allocated_hash;
MD4Update(this, chunk.ptr, chunk.len);
if (hash != NULL)
{
@@ -297,11 +297,11 @@ static void allocate_hash(private_md4_hasher_t *this, chunk_t chunk, chunk_t *ha
MD4Final(this, allocated_hash.ptr);
this->public.hasher_interface.reset(&(this->public.hasher_interface));
*hash = allocated_hash;
}
}
/**
* Implementation of hasher_t.get_hash_size.
*/
@@ -337,21 +337,21 @@ static void destroy(private_md4_hasher_t *this)
md4_hasher_t *md4_hasher_create(hash_algorithm_t algo)
{
private_md4_hasher_t *this;
if (algo != HASH_MD4)
{
return NULL;
}
this = malloc_thing(private_md4_hasher_t);
this->public.hasher_interface.get_hash = (void (*) (hasher_t*, chunk_t, u_int8_t*))get_hash;
this->public.hasher_interface.allocate_hash = (void (*) (hasher_t*, chunk_t, chunk_t*))allocate_hash;
this->public.hasher_interface.get_hash_size = (size_t (*) (hasher_t*))get_hash_size;
this->public.hasher_interface.reset = (void (*) (hasher_t*))reset;
this->public.hasher_interface.destroy = (void (*) (hasher_t*))destroy;
/* initialize */
reset(this);
return &(this->public);
}
+2 -2
View File
@@ -30,7 +30,7 @@ typedef struct md4_hasher_t md4_hasher_t;
* Implementation of hasher_t interface using the MD4 algorithm.
*/
struct md4_hasher_t {
/**
* Generic hasher_t interface for this hasher.
*/
@@ -39,7 +39,7 @@ struct md4_hasher_t {
/**
* Creates a new md4_hasher_t.
*
*
* @param algo hash algorithm, must be HASH_MD4
* @return md4_hasher_t object, NULL if not supported
*/
+3 -3
View File
@@ -47,12 +47,12 @@ static void destroy(private_md4_plugin_t *this)
plugin_t *plugin_create()
{
private_md4_plugin_t *this = malloc_thing(private_md4_plugin_t);
this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
lib->crypto->add_hasher(lib->crypto, HASH_MD4,
(hasher_constructor_t)md4_hasher_create);
return &this->public.plugin;
}