Fix redefinition error

master
lucas 2014-05-12 20:59:03 +01:00
parent 9ed71a8dc7
commit 043f809b99
3 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,4 @@
#ifndef __hash_h
#define __hash_h
#pragma once
/*
#include "crypto_uint8.h"
#include "crypto_uint32.h"
@ -11,6 +10,7 @@ typedef crypto_uint32 uint32_t;
typedef crypto_uint64 uint64_t;
*/
#include <stdint.h>
#include "hash.h"
/* some sizes (number of bytes) */
#define ROWS 8
@ -33,8 +33,6 @@ typedef crypto_uint64 uint64_t;
/* NIST API begin */
typedef unsigned char BitSequence;
typedef unsigned long long DataLength;
typedef struct {
uint32_t chaining[SIZE512/sizeof(uint32_t)]; /* actual state */
uint32_t block_counter1,
@ -56,5 +54,3 @@ int crypto_hash(unsigned char *out,
const unsigned char *in,
unsigned long long len);
*/
#endif /* __hash_h */

View File

@ -13,9 +13,8 @@
Last Modified: January 16, 2011
*/
#pragma once
#include "hash.h"
typedef unsigned char BitSequence;
typedef unsigned long long DataLength;
typedef enum {SUCCESS = 0, FAIL = 1, BAD_HASHLEN = 2} HashReturn;
HashReturn jh_hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval);

4
crypto/hash.h 100644
View File

@ -0,0 +1,4 @@
#pragma once
typedef unsigned char BitSequence;
typedef unsigned long long DataLength;