aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/aes128ecb_decrypt_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/aes128ecb_decrypt_file.cpp')
-rw-r--r--utils/aes128ecb_decrypt_file.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/aes128ecb_decrypt_file.cpp b/utils/aes128ecb_decrypt_file.cpp
index 6be3f94..33e0515 100644
--- a/utils/aes128ecb_decrypt_file.cpp
+++ b/utils/aes128ecb_decrypt_file.cpp
@@ -57,7 +57,7 @@ int main(int argc, char** argv)
src_ifs.exceptions(std::ifstream::badbit | std::ifstream::failbit);
src_ifs.open(src_path, std::ifstream::binary);
- std::vector<unsigned char> src_buf;
+ std::vector<char> src_buf;
src_buf.reserve(static_cast<std::vector<char>::size_type>(src_size));
src_buf.assign(std::istreambuf_iterator<char>(src_ifs),
std::istreambuf_iterator<char>());
@@ -68,7 +68,7 @@ int main(int argc, char** argv)
auto dest_size = aesni_decrypt_buffer_ecb128(
src_buf.data(), static_cast<std::size_t>(src_size), NULL, &inverted_schedule);
- std::vector<unsigned char> dest_buf(static_cast<std::vector<char>::size_type>(dest_size));
+ std::vector<char> dest_buf(static_cast<std::vector<char>::size_type>(dest_size));
dest_size = aesni_decrypt_buffer_ecb128(
src_buf.data(), static_cast<std::size_t>(src_size), dest_buf.data(), &inverted_schedule);
@@ -76,7 +76,7 @@ int main(int argc, char** argv)
std::ofstream dest_ofs;
dest_ofs.exceptions(std::ofstream::badbit | std::ofstream::failbit);
dest_ofs.open(dest_path, std::ofstream::binary);
- dest_ofs.write(reinterpret_cast<const char*>(dest_buf.data()), dest_size);
+ dest_ofs.write(dest_buf.data(), dest_size);
}
catch (const std::exception& e)
{