8 #define POLY1305_KEYLEN 32
9 #define POLY1305_TAGLEN 16
10 #define POLY1305_BLOCK_SIZE 16
12 /* use memcpy() to copy blocks of memory (typically faster) */
14 /* use unaligned little-endian load/store (can be faster) */
15 #define USE_UNALIGNED 0
17 struct poly1305_context {
22 unsigned char buffer[POLY1305_BLOCK_SIZE];
26 void poly1305_init(struct poly1305_context *ctx, const unsigned char key[32]);
27 void poly1305_update(struct poly1305_context *ctx, const unsigned char *m, size_t bytes);
28 void poly1305_finish(struct poly1305_context *ctx, unsigned char mac[16]);
29 void poly1305_auth(unsigned char mac[16], const unsigned char *m, size_t bytes, const unsigned char key[32]);
31 #endif /* POLY1305_H */