diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-11-08 12:13:01 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-11-08 12:13:01 +0200 |
commit | 6d89ab37754462928b28ad85714af316c83f43cb (patch) | |
tree | 9231ffc8b29f3d6c256ad7a074e524e58fa96b39 /main.cpp | |
parent | Replace P and S C-arrays with std::array (diff) | |
download | blowfish-6d89ab37754462928b28ad85714af316c83f43cb.tar.xz |
Add compile-time key length check
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |