aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--examples/aes128cbc.cpp5
-rw-r--r--examples/aes128cfb.cpp5
-rw-r--r--examples/aes128ctr.cpp5
-rw-r--r--examples/aes128ecb.cpp5
-rw-r--r--examples/aes128ofb.cpp5
-rw-r--r--examples/aes192cbc.cpp5
-rw-r--r--examples/aes192cfb.cpp5
-rw-r--r--examples/aes192ctr.cpp5
-rw-r--r--examples/aes192ecb.cpp5
-rw-r--r--examples/aes192ofb.cpp5
-rw-r--r--examples/aes256cbc.cpp5
-rw-r--r--examples/aes256cfb.cpp5
-rw-r--r--examples/aes256ctr.cpp5
-rw-r--r--examples/aes256ecb.cpp5
-rw-r--r--examples/aes256ofb.cpp5
-rw-r--r--test/decrypt_block_aes.cpp5
-rw-r--r--test/encrypt_block_aes.cpp5
-rw-r--r--utils/aes128ecb_decrypt_file.cpp5
-rw-r--r--utils/aes128ecb_encrypt_file.cpp5
19 files changed, 95 insertions, 0 deletions
diff --git a/examples/aes128cbc.cpp b/examples/aes128cbc.cpp
index 09f13cd..cf61604 100644
--- a/examples/aes128cbc.cpp
+++ b/examples/aes128cbc.cpp
@@ -47,6 +47,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes128cfb.cpp b/examples/aes128cfb.cpp
index a8bbb03..c8f7230 100644
--- a/examples/aes128cfb.cpp
+++ b/examples/aes128cfb.cpp
@@ -43,6 +43,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes128ctr.cpp b/examples/aes128ctr.cpp
index ebd8793..5419ce2 100644
--- a/examples/aes128ctr.cpp
+++ b/examples/aes128ctr.cpp
@@ -43,6 +43,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes128ecb.cpp b/examples/aes128ecb.cpp
index c716c70..d999f81 100644
--- a/examples/aes128ecb.cpp
+++ b/examples/aes128ecb.cpp
@@ -41,6 +41,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes128ofb.cpp b/examples/aes128ofb.cpp
index 32d67d5..f5f93d0 100644
--- a/examples/aes128ofb.cpp
+++ b/examples/aes128ofb.cpp
@@ -43,6 +43,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes192cbc.cpp b/examples/aes192cbc.cpp
index 8eaffa8..b2adabd 100644
--- a/examples/aes192cbc.cpp
+++ b/examples/aes192cbc.cpp
@@ -47,6 +47,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes192cfb.cpp b/examples/aes192cfb.cpp
index b84700e..d7fd9b5 100644
--- a/examples/aes192cfb.cpp
+++ b/examples/aes192cfb.cpp
@@ -43,6 +43,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes192ctr.cpp b/examples/aes192ctr.cpp
index d53cb38..9cad355 100644
--- a/examples/aes192ctr.cpp
+++ b/examples/aes192ctr.cpp
@@ -41,6 +41,11 @@ int main()
dump_decrypted(decrypted);
dump_next_iv(next_iv);
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes192ecb.cpp b/examples/aes192ecb.cpp
index 7a7cb92..313f084 100644
--- a/examples/aes192ecb.cpp
+++ b/examples/aes192ecb.cpp
@@ -41,6 +41,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes192ofb.cpp b/examples/aes192ofb.cpp
index c0fc88e..e2d96c4 100644
--- a/examples/aes192ofb.cpp
+++ b/examples/aes192ofb.cpp
@@ -43,6 +43,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes256cbc.cpp b/examples/aes256cbc.cpp
index 8ce14c2..c5ab427 100644
--- a/examples/aes256cbc.cpp
+++ b/examples/aes256cbc.cpp
@@ -47,6 +47,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes256cfb.cpp b/examples/aes256cfb.cpp
index 599392c..fb43d3a 100644
--- a/examples/aes256cfb.cpp
+++ b/examples/aes256cfb.cpp
@@ -43,6 +43,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes256ctr.cpp b/examples/aes256ctr.cpp
index 1431992..9827e79 100644
--- a/examples/aes256ctr.cpp
+++ b/examples/aes256ctr.cpp
@@ -41,6 +41,11 @@ int main()
dump_decrypted(decrypted);
dump_next_iv(next_iv);
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes256ecb.cpp b/examples/aes256ecb.cpp
index 49e03bf..e8777e2 100644
--- a/examples/aes256ecb.cpp
+++ b/examples/aes256ecb.cpp
@@ -41,6 +41,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/examples/aes256ofb.cpp b/examples/aes256ofb.cpp
index 3bc7268..1d806aa 100644
--- a/examples/aes256ofb.cpp
+++ b/examples/aes256ofb.cpp
@@ -43,6 +43,11 @@ int main()
return 0;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/test/decrypt_block_aes.cpp b/test/decrypt_block_aes.cpp
index ff2d494..3bb8e44 100644
--- a/test/decrypt_block_aes.cpp
+++ b/test/decrypt_block_aes.cpp
@@ -109,6 +109,11 @@ int main(int argc, char** argv)
std::cerr << "Usage error: " << e.what() << "\n";
return 1;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/test/encrypt_block_aes.cpp b/test/encrypt_block_aes.cpp
index fc56019..6de9288 100644
--- a/test/encrypt_block_aes.cpp
+++ b/test/encrypt_block_aes.cpp
@@ -109,6 +109,11 @@ int main(int argc, char** argv)
std::cerr << "Usage error: " << e.what() << "\n";
return 1;
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/utils/aes128ecb_decrypt_file.cpp b/utils/aes128ecb_decrypt_file.cpp
index ab55304..9b8b15c 100644
--- a/utils/aes128ecb_decrypt_file.cpp
+++ b/utils/aes128ecb_decrypt_file.cpp
@@ -89,6 +89,11 @@ int main(int argc, char** argv)
dest_ofs.open(dest_path, std::ofstream::binary);
dest_ofs.write(dest_buf.data(), dest_size);
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";
diff --git a/utils/aes128ecb_encrypt_file.cpp b/utils/aes128ecb_encrypt_file.cpp
index d197ec6..a43c4d9 100644
--- a/utils/aes128ecb_encrypt_file.cpp
+++ b/utils/aes128ecb_encrypt_file.cpp
@@ -88,6 +88,11 @@ int main(int argc, char** argv)
dest_ofs.open(dest_path, std::ofstream::binary);
dest_ofs.write(dest_buf.data(), dest_size);
}
+ catch (const aesni::Error& e)
+ {
+ std::cerr << e;
+ return 1;
+ }
catch (const std::exception& e)
{
std::cerr << e.what() << "\n";