From 2c976d52689829495c80868ef07781ee9d9a0fd0 Mon Sep 17 00:00:00 2001 From: Joost Rijneveld Date: Thu, 19 Oct 2017 16:04:42 +0200 Subject: [PATCH] Unify header guards By prefixing with XMSS_, we hopefully prevent conflicts --- fips202.h | 4 ++-- hash.h | 4 ++-- hash_address.h | 5 +++++ params.h | 4 ++-- randombytes.h | 4 ++-- wots.h | 4 ++-- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/fips202.h b/fips202.h index 871c209..d76083c 100644 --- a/fips202.h +++ b/fips202.h @@ -1,5 +1,5 @@ -#ifndef FIPS202_H -#define FIPS202_H +#ifndef XMSS_FIPS202_H +#define XMSS_FIPS202_H #define SHAKE128_RATE 168 #define SHAKE256_RATE 136 diff --git a/hash.h b/hash.h index bbd2cf2..4bfe2d5 100644 --- a/hash.h +++ b/hash.h @@ -5,8 +5,8 @@ Joost Rijneveld Public domain. */ -#ifndef HASH_H -#define HASH_H +#ifndef XMSS_HASH_H +#define XMSS_HASH_H #include "params.h" diff --git a/hash_address.h b/hash_address.h index 071d207..3944c79 100644 --- a/hash_address.h +++ b/hash_address.h @@ -5,6 +5,9 @@ Joost Rijneveld Public domain. */ +#ifndef XMSS_HASH_ADDRESS_H +#define XMSS_HASH_ADDRESS_H + #include void set_layer_addr(uint32_t addr[8], uint32_t layer); @@ -32,3 +35,5 @@ void set_ltree_addr(uint32_t addr[8], uint32_t ltree); void set_tree_height(uint32_t addr[8], uint32_t treeHeight); void set_tree_index(uint32_t addr[8], uint32_t treeIndex); + +#endif diff --git a/params.h b/params.h index c15a80d..bafa79e 100644 --- a/params.h +++ b/params.h @@ -1,5 +1,5 @@ -#ifndef PARAMS_H -#define PARAMS_H +#ifndef XMSS_PARAMS_H +#define XMSS_PARAMS_H #include diff --git a/randombytes.h b/randombytes.h index 053d3f1..65cf221 100644 --- a/randombytes.h +++ b/randombytes.h @@ -1,5 +1,5 @@ -#ifndef RANDOMBYTES_H -#define RANDOMBYTES_H +#ifndef XMSS_RANDOMBYTES_H +#define XMSS_RANDOMBYTES_H extern void randombytes(unsigned char * x,unsigned long long xlen); diff --git a/wots.h b/wots.h index 0aeb98f..c67b27c 100644 --- a/wots.h +++ b/wots.h @@ -5,8 +5,8 @@ Joost Rijneveld Public domain. */ -#ifndef WOTS_H -#define WOTS_H +#ifndef XMSS_WOTS_H +#define XMSS_WOTS_H #include #include "params.h"