aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-11-08 12:13:01 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2020-11-08 12:13:01 +0200
commit6d89ab37754462928b28ad85714af316c83f43cb (patch)
tree9231ffc8b29f3d6c256ad7a074e524e58fa96b39 /main.cpp
parentReplace P and S C-arrays with std::array (diff)
downloadblowfish-6d89ab37754462928b28ad85714af316c83f43cb.tar.xz
Add compile-time key length check
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 263438d..2a46d8c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -12,7 +12,7 @@ constexpr uint64_t k(const uint8_t key[8]) {
template <int i> struct wrapper {
constexpr void operator()() const {
- constexpr Blowfish b(variable_key[i], 8);
+ constexpr Blowfish::Context<8> b(std::to_array(variable_key[i]));
constexpr Blowfish::Block x(plaintext_l[i], plaintext_r[i]);
constexpr auto y = b.encrypt(x);