De-doxygenize crypto_verify_64.h in this branch.
This commit is contained in:
parent
80aff278d0
commit
c3d57f07ab
@ -4,54 +4,20 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
|
|
||||||
/** \addtogroup strcmp
|
|
||||||
*
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define crypto_verify_64_BYTES 64U
|
#define crypto_verify_64_BYTES 64U
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// @TODO
|
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
size_t crypto_verify_64_bytes(void);
|
size_t crypto_verify_64_bytes(void);
|
||||||
|
|
||||||
/**
|
|
||||||
* Compares the first crypto_verify_64_BYTES of the given strings.
|
|
||||||
*
|
|
||||||
* @param[in] string1 a string
|
|
||||||
* @param[in] string2 another string
|
|
||||||
*
|
|
||||||
* @return 0 if string1 and string2 are equal, otherwise -1.
|
|
||||||
*
|
|
||||||
* @pre string1 must be minimum of crypto_verify_64_BYTES long.
|
|
||||||
* @pre string2 must be minimum of crypto_verify_64_BYTES long.
|
|
||||||
*
|
|
||||||
* @note The time taken by the function is independent of the contents
|
|
||||||
* of string1 and string2. In contrast, the standard C comparison
|
|
||||||
* function memcmp(string1,string2,64) takes time that is dependent on
|
|
||||||
* the longest matching prefix of string1 and string2. This often
|
|
||||||
* allows for easy timing attacks.
|
|
||||||
*
|
|
||||||
* Example invocation:
|
|
||||||
*
|
|
||||||
*~~~~~{.c}
|
|
||||||
* const unsigned char x[64];
|
|
||||||
* const unsigned char y[64];
|
|
||||||
*
|
|
||||||
* crypto_verify_64(x,y);
|
|
||||||
*~~~~~
|
|
||||||
*/
|
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
int crypto_verify_64(const unsigned char *x, const unsigned char *y);
|
int crypto_verify_64(const unsigned char *x, const unsigned char *y);
|
||||||
|
|
||||||
#define crypto_verify_64_ref crypto_verify_64 ///< @TODO
|
#define crypto_verify_64_ref crypto_verify_64
|
||||||
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user