Warning, file /include/sodium/crypto_onetimeauth_poly1305.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_poly1305_H
0002 #define crypto_onetimeauth_poly1305_H
0003
0004 #include <stdint.h>
0005 #include <stdio.h>
0006 #include <stdlib.h>
0007
0008 #include <sys/types.h>
0009
0010 #include "export.h"
0011
0012 #ifdef __cplusplus
0013 # ifdef __GNUC__
0014 # pragma GCC diagnostic ignored "-Wlong-long"
0015 # endif
0016 extern "C" {
0017 #endif
0018
0019 typedef struct CRYPTO_ALIGN(16) crypto_onetimeauth_poly1305_state {
0020 unsigned char opaque[256];
0021 } crypto_onetimeauth_poly1305_state;
0022
0023 SODIUM_EXPORT
0024 size_t crypto_onetimeauth_poly1305_statebytes(void);
0025
0026 #define crypto_onetimeauth_poly1305_BYTES 16U
0027 SODIUM_EXPORT
0028 size_t crypto_onetimeauth_poly1305_bytes(void);
0029
0030 #define crypto_onetimeauth_poly1305_KEYBYTES 32U
0031 SODIUM_EXPORT
0032 size_t crypto_onetimeauth_poly1305_keybytes(void);
0033
0034 SODIUM_EXPORT
0035 int crypto_onetimeauth_poly1305(unsigned char *out,
0036 const unsigned char *in,
0037 unsigned long long inlen,
0038 const unsigned char *k)
0039 __attribute__ ((nonnull(1, 4)));
0040
0041 SODIUM_EXPORT
0042 int crypto_onetimeauth_poly1305_verify(const unsigned char *h,
0043 const unsigned char *in,
0044 unsigned long long inlen,
0045 const unsigned char *k)
0046 __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
0047
0048 SODIUM_EXPORT
0049 int crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *state,
0050 const unsigned char *key)
0051 __attribute__ ((nonnull));
0052
0053 SODIUM_EXPORT
0054 int crypto_onetimeauth_poly1305_update(crypto_onetimeauth_poly1305_state *state,
0055 const unsigned char *in,
0056 unsigned long long inlen)
0057 __attribute__ ((nonnull(1)));
0058
0059 SODIUM_EXPORT
0060 int crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *state,
0061 unsigned char *out)
0062 __attribute__ ((nonnull));
0063
0064 SODIUM_EXPORT
0065 void crypto_onetimeauth_poly1305_keygen(unsigned char k[crypto_onetimeauth_poly1305_KEYBYTES])
0066 __attribute__ ((nonnull));
0067
0068 #ifdef __cplusplus
0069 }
0070 #endif
0071
0072 #endif