aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-10-17 09:55:12 (GMT)
committerJouni Malinen <j@w1.fi>2009-10-17 09:55:12 (GMT)
commit08d38568df4b5c36997c5b2615064979fb89b16f (patch)
tree686d9af2cf6c16b5333747a75dcd76763b4c9601 /src
parent1e8c857abe2b1dfb564b96f12dd146eb370e3346 (diff)
downloadhostap-08d38568df4b5c36997c5b2615064979fb89b16f.zip
hostap-08d38568df4b5c36997c5b2615064979fb89b16f.tar.gz
hostap-08d38568df4b5c36997c5b2615064979fb89b16f.tar.bz2
Move shared MD5/SHA-1 internal definitions into header files
Diffstat (limited to 'src')
-rw-r--r--src/crypto/crypto_internal.c13
-rw-r--r--src/crypto/md5-internal.c5
-rw-r--r--src/crypto/md5_i.h6
-rw-r--r--src/crypto/sha1-internal.c6
-rw-r--r--src/crypto/sha1_i.h6
5 files changed, 10 insertions, 26 deletions
diff --git a/src/crypto/crypto_internal.c b/src/crypto/crypto_internal.c
index 41ec8bc..34b43ae 100644
--- a/src/crypto/crypto_internal.c
+++ b/src/crypto/crypto_internal.c
@@ -29,19 +29,6 @@
#ifdef CONFIG_TLS_INTERNAL
-struct MD5Context {
- u32 buf[4];
- u32 bits[2];
- u8 in[64];
-};
-
-struct SHA1Context {
- u32 state[5];
- u32 count[2];
- unsigned char buffer[64];
-};
-
-
struct crypto_hash {
enum crypto_hash_alg alg;
union {
diff --git a/src/crypto/md5-internal.c b/src/crypto/md5-internal.c
index d58bbde..f8692a9 100644
--- a/src/crypto/md5-internal.c
+++ b/src/crypto/md5-internal.c
@@ -19,11 +19,6 @@
#include "md5_i.h"
#include "crypto.h"
-struct MD5Context {
- u32 buf[4];
- u32 bits[2];
- u8 in[64];
-};
static void MD5Transform(u32 buf[4], u32 const in[16]);
diff --git a/src/crypto/md5_i.h b/src/crypto/md5_i.h
index 7697c3f..b7f6596 100644
--- a/src/crypto/md5_i.h
+++ b/src/crypto/md5_i.h
@@ -15,7 +15,11 @@
#ifndef MD5_I_H
#define MD5_I_H
-struct MD5Context;
+struct MD5Context {
+ u32 buf[4];
+ u32 bits[2];
+ u8 in[64];
+};
void MD5Init(struct MD5Context *context);
void MD5Update(struct MD5Context *context, unsigned char const *buf,
diff --git a/src/crypto/sha1-internal.c b/src/crypto/sha1-internal.c
index dfe8940..51e6121 100644
--- a/src/crypto/sha1-internal.c
+++ b/src/crypto/sha1-internal.c
@@ -20,12 +20,6 @@
#include "md5.h"
#include "crypto.h"
-struct SHA1Context {
- u32 state[5];
- u32 count[2];
- unsigned char buffer[64];
-};
-
typedef struct SHA1Context SHA1_CTX;
void SHA1Transform(u32 state[5], const unsigned char buffer[64]);
diff --git a/src/crypto/sha1_i.h b/src/crypto/sha1_i.h
index e4b3a96..ec2f82f 100644
--- a/src/crypto/sha1_i.h
+++ b/src/crypto/sha1_i.h
@@ -15,7 +15,11 @@
#ifndef SHA1_I_H
#define SHA1_I_H
-struct SHA1Context;
+struct SHA1Context {
+ u32 state[5];
+ u32 count[2];
+ unsigned char buffer[64];
+};
void SHA1Init(struct SHA1Context *context);
void SHA1Update(struct SHA1Context *context, const void *data, u32 len);