aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cxx/include/aesxx/box.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-07-27 23:45:04 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2017-07-27 23:45:04 +0200
commitbb078fd01e6568982044e0f846029b9670f7f6df (patch)
tree3d262bd23749c977a18542096515b0c9144dd5d2 /cxx/include/aesxx/box.hpp
parenttest: support running scripts from other dirs (diff)
downloadaes-tools-bb078fd01e6568982044e0f846029b9670f7f6df.tar.gz
aes-tools-bb078fd01e6568982044e0f846029b9670f7f6df.zip
code style
Diffstat (limited to '')
-rw-r--r--cxx/include/aesxx/box.hpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/cxx/include/aesxx/box.hpp b/cxx/include/aesxx/box.hpp
index 3d9529b..076407c 100644
--- a/cxx/include/aesxx/box.hpp
+++ b/cxx/include/aesxx/box.hpp
@@ -11,10 +11,8 @@
#include <aes/all.h>
-#include <cassert>
#include <cstddef>
-#include <iostream>
#include <string>
#include <vector>
@@ -77,16 +75,16 @@ namespace aes
}
Box(Algorithm algorithm, const Key& key)
- : algorithm(algorithm)
- , mode(AES_ECB)
+ : algorithm{algorithm}
+ , mode{AES_ECB}
{
aes_box_init(&impl, algorithm, &key, mode, nullptr,
ErrorDetailsThrowsInDestructor{});
}
Box(Algorithm algorithm, const Key& key, Mode mode, const Block& iv)
- : algorithm(algorithm)
- , mode(mode)
+ : algorithm{algorithm}
+ , mode{mode}
{
aes_box_init(&impl, algorithm, &key, mode, &iv,
ErrorDetailsThrowsInDestructor{});
@@ -110,7 +108,7 @@ namespace aes
const void* src_buf,
std::size_t src_size)
{
- std::size_t dest_size;
+ std::size_t dest_size = 0;
aes_box_encrypt_buffer(
&impl,
@@ -139,7 +137,7 @@ namespace aes
const void* src_buf,
std::size_t src_size)
{
- std::size_t dest_size;
+ std::size_t dest_size = 0;
aes_box_decrypt_buffer(
&impl,