libssh  0.11.0
The SSH library
Loading...
Searching...
No Matches
poly1305.h
1/*
2 * Public Domain poly1305 from Andrew Moon
3 * poly1305-donna-unrolled.c from https://github.com/floodyberry/poly1305-donna
4 */
5
6#ifndef POLY1305_H
7#define POLY1305_H
8#include "libssh/chacha20-poly1305-common.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14void poly1305_auth(uint8_t out[POLY1305_TAGLEN], const uint8_t *m, size_t inlen,
15 const uint8_t key[POLY1305_KEYLEN])
16#ifdef HAVE_GCC_BOUNDED_ATTRIBUTE
17 __attribute__((__bounded__(__minbytes__, 1, POLY1305_TAGLEN)))
18 __attribute__((__bounded__(__buffer__, 2, 3)))
19 __attribute__((__bounded__(__minbytes__, 4, POLY1305_KEYLEN)))
20#endif
21 ;
22
23#ifdef __cplusplus
24}
25#endif
26
27#endif /* POLY1305_H */