]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Move shared MD5/SHA-1 internal definitions into header files
authorJouni Malinen <j@w1.fi>
Sat, 17 Oct 2009 09:55:12 +0000 (12:55 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 17 Oct 2009 09:55:12 +0000 (12:55 +0300)
src/crypto/crypto_internal.c
src/crypto/md5-internal.c
src/crypto/md5_i.h
src/crypto/sha1-internal.c
src/crypto/sha1_i.h

index 41ec8bce385b870a26eb01100a7b1730705aea0b..34b43aedbdad2f6076ba9d71ce8c3ebd378b106b 100644 (file)
 
 #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 {
index d58bbde9a59df29680be4a6e9fdf60d439b79e71..f8692a9557aed0048fbbfc28494f1462b1f1e5b0 100644 (file)
 #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]);
 
index 7697c3fe669988d4edbcf522fd983dcf24a917aa..b7f6596052a6badc06a1d048f3d6452da9e2761d 100644 (file)
 #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,
index dfe8940945623dfaa250b588a8f4071244fe269d..51e612136e2e0ce188d847f0c35a505fee69d204 100644 (file)
 #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]);
index e4b3a968ba6d2529708bfb35291eb92d02bc596b..ec2f82f75b969ba58a42b79964c37d4893ec7f5f 100644 (file)
 #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);