Skip to content

Commit 043f809

Browse files
committed
Fix redefinition error
1 parent 9ed71a8 commit 043f809

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

crypto/c_groestl.h

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef __hash_h
2-
#define __hash_h
1+
#pragma once
32
/*
43
#include "crypto_uint8.h"
54
#include "crypto_uint32.h"
@@ -11,6 +10,7 @@ typedef crypto_uint32 uint32_t;
1110
typedef crypto_uint64 uint64_t;
1211
*/
1312
#include <stdint.h>
13+
#include "hash.h"
1414

1515
/* some sizes (number of bytes) */
1616
#define ROWS 8
@@ -33,8 +33,6 @@ typedef crypto_uint64 uint64_t;
3333

3434

3535
/* NIST API begin */
36-
typedef unsigned char BitSequence;
37-
typedef unsigned long long DataLength;
3836
typedef struct {
3937
uint32_t chaining[SIZE512/sizeof(uint32_t)]; /* actual state */
4038
uint32_t block_counter1,
@@ -56,5 +54,3 @@ int crypto_hash(unsigned char *out,
5654
const unsigned char *in,
5755
unsigned long long len);
5856
*/
59-
60-
#endif /* __hash_h */

crypto/c_jh.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
Last Modified: January 16, 2011
1414
*/
1515
#pragma once
16+
#include "hash.h"
1617

17-
typedef unsigned char BitSequence;
18-
typedef unsigned long long DataLength;
1918
typedef enum {SUCCESS = 0, FAIL = 1, BAD_HASHLEN = 2} HashReturn;
2019

2120
HashReturn jh_hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval);

crypto/hash.h

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#pragma once
2+
3+
typedef unsigned char BitSequence;
4+
typedef unsigned long long DataLength;

0 commit comments

Comments
 (0)