1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
5 #ifndef _CHACHA20_POLY1305_H_
6 #define _CHACHA20_POLY1305_H_ 1
7 
8 /* ChaCha20Poly1305ContextStr saves the key and tag length for a
9  * ChaCha20+Poly1305 AEAD operation. */
10 struct ChaCha20Poly1305ContextStr {
11     unsigned char key[32];
12     unsigned char tagLen;
13 };
14 
15 struct ChaCha20ContextStr {
16     unsigned char key[32];
17     unsigned char nonce[12];
18     PRUint32 counter;
19 };
20 
21 #endif /* _CHACHA20_POLY1305_H_ */
22