libssh 0.12.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
9#include <stddef.h>
10#include <stdint.h>
11
12#include "libssh/chacha20-poly1305-common.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18void poly1305_auth(uint8_t out[POLY1305_TAGLEN], const uint8_t *m, size_t inlen,
19 const uint8_t key[POLY1305_KEYLEN])
20#ifdef HAVE_GCC_BOUNDED_ATTRIBUTE
21 __attribute__((__bounded__(__minbytes__, 1, POLY1305_TAGLEN)))
22 __attribute__((__bounded__(__buffer__, 2, 3)))
23 __attribute__((__bounded__(__minbytes__, 4, POLY1305_KEYLEN)))
24#endif
25 ;
26
27#ifdef __cplusplus
28}
29#endif
30
31#endif /* POLY1305_H */