Turn crypto_verify macros to functions.

No wrappers since there isn't going to be alternative implementations anytime
soon.
This commit is contained in:
Frank Denis
2013-04-21 17:32:08 -07:00
parent 3ffdfd2b3d
commit 3f13a1e9d0
6 changed files with 10 additions and 24 deletions
+2 -8
View File
@@ -1,12 +1,6 @@
#ifndef crypto_verify_H
#define crypto_verify_H
#ifndef crypto_verify_16_H
#define crypto_verify_16_H
#include "crypto_verify_16.h"
#define crypto_verify crypto_verify_16
#define crypto_verify_BYTES crypto_verify_16_BYTES
#define crypto_verify_PRIMITIVE "16"
#define crypto_verify_IMPLEMENTATION crypto_verify_16_IMPLEMENTATION
#define crypto_verify_VERSION crypto_verify_16_VERSION
#endif
@@ -1,6 +1,6 @@
#include "api.h"
int crypto_verify(const unsigned char *x,const unsigned char *y)
int crypto_verify_16(const unsigned char *x,const unsigned char *y)
{
unsigned int differentbits = 0;
#define F(i) differentbits |= x[i] ^ y[i];
+2 -8
View File
@@ -1,12 +1,6 @@
#ifndef crypto_verify_H
#define crypto_verify_H
#ifndef crypto_verify_32_H
#define crypto_verify_32_H
#include "crypto_verify_32.h"
#define crypto_verify crypto_verify_32
#define crypto_verify_BYTES crypto_verify_32_BYTES
#define crypto_verify_PRIMITIVE "32"
#define crypto_verify_IMPLEMENTATION crypto_verify_32_IMPLEMENTATION
#define crypto_verify_VERSION crypto_verify_32_VERSION
#endif
@@ -1,6 +1,6 @@
#include "api.h"
int crypto_verify(const unsigned char *x,const unsigned char *y)
int crypto_verify_32(const unsigned char *x,const unsigned char *y)
{
unsigned int differentbits = 0;
#define F(i) differentbits |= x[i] ^ y[i];
@@ -5,11 +5,10 @@
#ifdef __cplusplus
extern "C" {
#endif
extern int crypto_verify_16_ref(const unsigned char *,const unsigned char *);
int crypto_verify_16(const unsigned char *x, const unsigned char *y);
#define crypto_verify_16_ref crypto_verify_16
#ifdef __cplusplus
}
#endif
#define crypto_verify_16 crypto_verify_16_ref
#endif
@@ -5,11 +5,10 @@
#ifdef __cplusplus
extern "C" {
#endif
extern int crypto_verify_32_ref(const unsigned char *,const unsigned char *);
int crypto_verify_32(const unsigned char *x, const unsigned char *y);
#define crypto_verify_32_ref crypto_verify_32
#ifdef __cplusplus
}
#endif
#define crypto_verify_32 crypto_verify_32_ref
#endif