Commit 111518dd authored by Niels Möller's avatar Niels Möller

Replaced all internal usage of sha.h.

parent f9ef3299
2012-12-02 Niels Möller <nisse@lysator.liu.se> 2012-12-02 Niels Möller <nisse@lysator.liu.se>
Split sha.h into new files sha1.h and sha2.h. Split sha.h into new files sha1.h and sha2.h. Replaced all
internal usage of sha.h in all files.
* sha.h: Kept for compatibility, just includes both new files. * sha.h: Kept for compatibility, just includes both new files.
* sha1.h: New file. * sha1.h: New file.
* sha2.h: New file. * sha2.h: New file.
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
#include "nettle-types.h" #include "nettle-types.h"
#include "sha.h" #include "sha1.h"
#include "sha2.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
#include "memxor.h" #include "memxor.h"
#include "salsa20.h" #include "salsa20.h"
#include "serpent.h" #include "serpent.h"
#include "sha.h" #include "sha1.h"
#include "sha2.h"
#include "sha3.h" #include "sha3.h"
#include "twofish.h" #include "twofish.h"
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
#include "md5.h" #include "md5.h"
#include "ripemd160.h" #include "ripemd160.h"
#include "sha.h" #include "sha1.h"
#include "sha2.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
#include "nettle-types.h" #include "nettle-types.h"
#include "md5.h" #include "md5.h"
#include "sha.h" #include "sha1.h"
#include "sha2.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <nettle/sha.h> #include <nettle/sha1.h>
#define BUF_SIZE 1000 #define BUF_SIZE 1000
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "sha.h" #include "sha1.h"
#include "macros.h" #include "macros.h"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "nettle-meta.h" #include "nettle-meta.h"
#include "sha.h" #include "sha1.h"
const struct nettle_hash nettle_sha1 const struct nettle_hash nettle_sha1
= _NETTLE_HASH(sha1, SHA1); = _NETTLE_HASH(sha1, SHA1);
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "sha.h" #include "sha1.h"
#include "macros.h" #include "macros.h"
#include "nettle-write.h" #include "nettle-write.h"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "nettle-meta.h" #include "nettle-meta.h"
#include "sha.h" #include "sha2.h"
const struct nettle_hash nettle_sha224 const struct nettle_hash nettle_sha224
= _NETTLE_HASH(sha224, SHA224); = _NETTLE_HASH(sha224, SHA224);
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "sha.h" #include "sha2.h"
#include "macros.h" #include "macros.h"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "nettle-meta.h" #include "nettle-meta.h"
#include "sha.h" #include "sha2.h"
const struct nettle_hash nettle_sha256 const struct nettle_hash nettle_sha256
= _NETTLE_HASH(sha256, SHA256); = _NETTLE_HASH(sha256, SHA256);
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "sha.h" #include "sha2.h"
#include "macros.h" #include "macros.h"
#include "nettle-write.h" #include "nettle-write.h"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "nettle-meta.h" #include "nettle-meta.h"
#include "sha.h" #include "sha2.h"
const struct nettle_hash nettle_sha384 const struct nettle_hash nettle_sha384
= _NETTLE_HASH(sha384, SHA384); = _NETTLE_HASH(sha384, SHA384);
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "sha.h" #include "sha2.h"
#include "macros.h" #include "macros.h"
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "nettle-meta.h" #include "nettle-meta.h"
#include "sha.h" #include "sha2.h"
const struct nettle_hash nettle_sha512 const struct nettle_hash nettle_sha512
= _NETTLE_HASH(sha512, SHA512); = _NETTLE_HASH(sha512, SHA512);
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "sha.h" #include "sha2.h"
#include "macros.h" #include "macros.h"
......
#include "testutils.h" #include "testutils.h"
#include "hmac.h" #include "hmac.h"
#include "sha.h"
#include "pbkdf2.h" #include "pbkdf2.h"
/* NOTE: The salt argument is expected to expand to length, data */ /* NOTE: The salt argument is expected to expand to length, data */
......
#include "testutils.h" #include "testutils.h"
#include "sha.h"
void void
test_main(void) test_main(void)
......
#include "testutils.h" #include "testutils.h"
#include "sha.h"
void void
test_main(void) test_main(void)
......
#include "testutils.h" #include "testutils.h"
#include "sha.h"
void void
test_main(void) test_main(void)
......
#include "testutils.h" #include "testutils.h"
#include "sha.h"
void void
test_main(void) test_main(void)
......
#include "testutils.h" #include "testutils.h"
#include "sha.h"
void void
test_main(void) test_main(void)
......
#include "testutils.h" #include "testutils.h"
#include "sha.h"
void void
test_main(void) test_main(void)
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define NETTLE_YARROW_H_INCLUDED #define NETTLE_YARROW_H_INCLUDED
#include "aes.h" #include "aes.h"
#include "sha.h" #include "sha2.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment