- Drop redundant code.
I should read code carefully, mbed TLS will set operation
when invoking mbedtls_cipher_setkey(), the last param
const mbedtls_operation_t operation is what we want.
- minor changes
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
ChaCha20 with an extended (96 bit) nonce and a 32-bit counter has
been implemented as crypto_stream_chacha20_ietf() from LibSodium 1.0.4
Please refer to https://tools.ietf.org/html/rfc7539 for details.
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>