mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-27 12:17:12 +09:00
Turn crypto_verify macros to functions.
No wrappers since there isn't going to be alternative implementations anytime soon.
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user