Mercurial > dropbear
comparison libtomcrypt/src/encauth/chachapoly/chacha20poly1305_init.c @ 1511:5916af64acd4 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 17 Feb 2018 19:29:51 +0800 |
parents | 6dba84798cd5 |
children |
comparison
equal
deleted
inserted
replaced
1457:32f990cc96b1 | 1511:5916af64acd4 |
---|---|
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis | |
2 * | |
3 * LibTomCrypt is a library that provides various cryptographic | |
4 * algorithms in a highly modular and flexible manner. | |
5 * | |
6 * The library is free for all purposes without any express | |
7 * guarantee it works. | |
8 */ | |
9 | |
10 #include "tomcrypt.h" | |
11 | |
12 #ifdef LTC_CHACHA20POLY1305_MODE | |
13 | |
14 /** | |
15 Initialize an ChaCha20Poly1305 context (only the key) | |
16 @param st [out] The destination of the ChaCha20Poly1305 state | |
17 @param key The secret key | |
18 @param keylen The length of the secret key (octets) | |
19 @return CRYPT_OK if successful | |
20 */ | |
21 int chacha20poly1305_init(chacha20poly1305_state *st, const unsigned char *key, unsigned long keylen) | |
22 { | |
23 return chacha_setup(&st->chacha, key, keylen, 20); | |
24 } | |
25 | |
26 #endif | |
27 | |
28 /* ref: $Format:%D$ */ | |
29 /* git commit: $Format:%H$ */ | |
30 /* commit time: $Format:%ai$ */ |