File: crypto_auth_siphash24.c

package info (click to toggle)
dq 20230101-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,020 kB
  • sloc: ansic: 8,269; makefile: 363; sh: 176; python: 82
file content (14 lines) | stat: -rw-r--r-- 513 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "siphash.h"
#include "crypto_verify_8.h"
#include "crypto_auth_siphash24.h"

int crypto_auth_siphash24_tinynacl(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k) {
    return siphash(out, in, inlen, k, 2, 4);
}

int crypto_auth_siphash24_tinynacl_verify(const unsigned char *h, const unsigned char *m, unsigned long long n, const unsigned char *k) {

    unsigned char x[8];
    crypto_auth_siphash24_tinynacl(x, m, n, k);
    return crypto_verify_8(h, x);
}