Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/sodium/crypto_hash.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef crypto_hash_H
0002 #define crypto_hash_H
0003 
0004 /*
0005  * WARNING: Unless you absolutely need to use SHA512 for interoperability,
0006  * purposes, you might want to consider crypto_generichash() instead.
0007  * Unlike SHA512, crypto_generichash() is not vulnerable to length
0008  * extension attacks.
0009  */
0010 
0011 #include <stddef.h>
0012 
0013 #include "crypto_hash_sha512.h"
0014 #include "export.h"
0015 
0016 #ifdef __cplusplus
0017 # ifdef __GNUC__
0018 #  pragma GCC diagnostic ignored "-Wlong-long"
0019 # endif
0020 extern "C" {
0021 #endif
0022 
0023 #define crypto_hash_BYTES crypto_hash_sha512_BYTES
0024 SODIUM_EXPORT
0025 size_t crypto_hash_bytes(void);
0026 
0027 SODIUM_EXPORT
0028 int crypto_hash(unsigned char *out, const unsigned char *in,
0029                 unsigned long long inlen) __attribute__ ((nonnull(1)));
0030 
0031 #define crypto_hash_PRIMITIVE "sha512"
0032 SODIUM_EXPORT
0033 const char *crypto_hash_primitive(void)
0034             __attribute__ ((warn_unused_result));
0035 
0036 #ifdef __cplusplus
0037 }
0038 #endif
0039 
0040 #endif