Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/sodium/crypto_onetimeauth.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_onetimeauth_H
0002 #define crypto_onetimeauth_H
0003 
0004 #include <stddef.h>
0005 
0006 #include "crypto_onetimeauth_poly1305.h"
0007 #include "export.h"
0008 
0009 #ifdef __cplusplus
0010 # ifdef __GNUC__
0011 #  pragma GCC diagnostic ignored "-Wlong-long"
0012 # endif
0013 extern "C" {
0014 #endif
0015 
0016 typedef crypto_onetimeauth_poly1305_state crypto_onetimeauth_state;
0017 
0018 SODIUM_EXPORT
0019 size_t  crypto_onetimeauth_statebytes(void);
0020 
0021 #define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES
0022 SODIUM_EXPORT
0023 size_t  crypto_onetimeauth_bytes(void);
0024 
0025 #define crypto_onetimeauth_KEYBYTES crypto_onetimeauth_poly1305_KEYBYTES
0026 SODIUM_EXPORT
0027 size_t  crypto_onetimeauth_keybytes(void);
0028 
0029 #define crypto_onetimeauth_PRIMITIVE "poly1305"
0030 SODIUM_EXPORT
0031 const char *crypto_onetimeauth_primitive(void);
0032 
0033 SODIUM_EXPORT
0034 int crypto_onetimeauth(unsigned char *out, const unsigned char *in,
0035                        unsigned long long inlen, const unsigned char *k)
0036             __attribute__ ((nonnull(1, 4)));
0037 
0038 SODIUM_EXPORT
0039 int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in,
0040                               unsigned long long inlen, const unsigned char *k)
0041             __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
0042 
0043 SODIUM_EXPORT
0044 int crypto_onetimeauth_init(crypto_onetimeauth_state *state,
0045                             const unsigned char *key) __attribute__ ((nonnull));
0046 
0047 SODIUM_EXPORT
0048 int crypto_onetimeauth_update(crypto_onetimeauth_state *state,
0049                               const unsigned char *in,
0050                               unsigned long long inlen)
0051             __attribute__ ((nonnull(1)));
0052 
0053 SODIUM_EXPORT
0054 int crypto_onetimeauth_final(crypto_onetimeauth_state *state,
0055                              unsigned char *out) __attribute__ ((nonnull));
0056 
0057 SODIUM_EXPORT
0058 void crypto_onetimeauth_keygen(unsigned char k[crypto_onetimeauth_KEYBYTES])
0059             __attribute__ ((nonnull));
0060 
0061 #ifdef __cplusplus
0062 }
0063 #endif
0064 
0065 #endif