1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! `key` module provides a simple object struct to maintain
//! generated key and nonce used to encrypt and decrypt a message
use crate::;
use ;
/// `Key` used to store `key` and `nonce`
///
/// The `key` field used to store bytes that defined by
/// `chacha20poly1305` key properties which is an alias of
/// `GenericArray<u8, U32>`
///
/// The `nonce` field used when encrypt and decrypt given message
/// which is an alias of `GenericArray<u8, <A as AeadCore>::NonceSize>`
/// taken from `aead` crate
///
/// Both of these properties grouped into this single object to simplify
/// the API library