File: crypto_onetimeauth_poly1305_lib1305.c

package info (click to toggle)
tinyssh 20250501-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,388 kB
  • sloc: ansic: 20,245; sh: 1,582; python: 1,449; makefile: 913
file content (22 lines) | stat: -rw-r--r-- 775 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "haslib1305.h"
#ifdef HASLIB1305

#include <lib1305.h>
#include "crypto_onetimeauth_poly1305.h"

int crypto_onetimeauth_poly1305_lib1305(unsigned char *a,
                                        const unsigned char *m,
                                        unsigned long long n,
                                        const unsigned char *k) {
    poly1305(a, m, (unsigned long long) n, k);
    return 0;
}

int crypto_onetimeauth_poly1305_lib1305_verify(const unsigned char *a,
                                               const unsigned char *m,
                                               unsigned long long n,
                                               const unsigned char *k) {
    return poly1305_verify(a, m, (unsigned long long) n, k);
}

#endif