1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 02:25:14 -07:00

Use the same ifndef convention as most other header files

This commit is contained in:
Frank Denis 2015-11-04 16:44:48 +01:00
parent 26c7aa123e
commit 8251519650
10 changed files with 30 additions and 22 deletions

View File

@ -1,5 +1,5 @@
#ifndef CONSTS_NAMESPACE_H
#define CONSTS_NAMESPACE_H
#ifndef consts_namespace_H
#define consts_namespace_H
#define v0_0 crypto_scalarmult_curve25519_sandy2x_v0_0
#define v1_0 crypto_scalarmult_curve25519_sandy2x_v1_0
@ -18,5 +18,5 @@
#define subc2 crypto_scalarmult_curve25519_sandy2x_subc2
#define REDMASK51 crypto_scalarmult_curve25519_sandy2x_REDMASK51
#endif //ifndef CONSTS_NAMESPACE_H
#endif //ifndef consts_namespace_H

View File

@ -3,8 +3,8 @@
All the redundant functions are removed.
*/
#ifndef FE_H
#define FE_H
#ifndef fe_H
#define fe_H
#include "crypto_uint64.h"

View File

@ -5,8 +5,8 @@
New function fe51_nsquare is introduced.
*/
#ifndef FE51_H
#define FE51_H
#ifndef fe51_H
#define fe51_H
#include "crypto_uint64.h"
#include "fe51_namespace.h"

View File

@ -5,6 +5,8 @@
#include "fe51.h"
#ifdef HAVE_AMD64_ASM
#define fe51_square(x, y) fe51_nsquare(x, y, 1)
void fe51_invert(fe51 *r, const fe51 *x)
@ -51,3 +53,5 @@ void fe51_invert(fe51 *r, const fe51 *x)
/* 2^255 - 2^5 */ fe51_nsquare(&t,&t,5);
/* 2^255 - 21 */ fe51_mul(r,&t,&z11);
}
#endif

View File

@ -1,5 +1,5 @@
#ifndef FE51_NAMESPACE_H
#define FE51_NAMESPACE_H
#ifndef fe51_namespace_H
#define fe51_namespace_H
#define fe51 crypto_scalarmult_curve25519_sandy2x_fe51
#define _fe51 _crypto_scalarmult_curve25519_sandy2x_fe51
@ -12,5 +12,5 @@
#define fe51_invert crypto_scalarmult_curve25519_sandy2x_fe51_invert
#endif //ifndef FE51_NAMESPACE_H
#endif //ifndef fe51_namespace_H

View File

@ -5,6 +5,8 @@
#include "fe.h"
#include "crypto_uint64.h"
#ifdef HAVE_AMD64_ASM
static crypto_uint64 load_3(const unsigned char *in)
{
crypto_uint64 result;
@ -70,3 +72,5 @@ void fe_frombytes(fe h,const unsigned char *s)
h[8] = h8;
h[9] = h9;
}
#endif

View File

@ -1,10 +1,10 @@
#ifndef LADDER_H
#define LADDER_H
#ifndef ladder_H
#define ladder_H
#include "fe.h"
#include "ladder_namespace.h"
extern void ladder(fe *, const unsigned char *);
#endif //ifndef LADDER_H
#endif //ifndef ladder_H

View File

@ -1,10 +1,10 @@
#ifndef LADDER_BASE_H
#define LADDER_BASE_H
#ifndef ladder_base_H
#define ladder_base_H
#include "fe.h"
#include "ladder_base_namespace.h"
extern void ladder_base(fe *, const unsigned char *);
#endif //ifndef LADDER_BASE_H
#endif //ifndef ladder_base_H

View File

@ -1,8 +1,8 @@
#ifndef LADDER_BASE_NAMESPACE_H
#define LADDER_BASE_NAMESPACE_H
#ifndef ladder_base_namespace_H
#define ladder_base_namespace_H
#define ladder_base crypto_scalarmult_curve25519_sandy2x_ladder_base
#define _ladder_base _crypto_scalarmult_curve25519_sandy2x_ladder_base
#endif //ifndef LADDER_BASE_NAMESPACE_H
#endif //ifndef ladder_base_namespace_H

View File

@ -1,8 +1,8 @@
#ifndef LADDER_NAMESPACE_H
#define LADDER_NAMESPACE_H
#ifndef ladder_namespace_H
#define ladder_namespace_H
#define ladder crypto_scalarmult_curve25519_sandy2x_ladder
#define _ladder _crypto_scalarmult_curve25519_sandy2x_ladder
#endif //ifndef LADDER_NAMESPACE_H
#endif //ifndef ladder_namespace_H