aboutsummaryrefslogtreecommitdiff
path: root/blowfish.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'blowfish.hpp')
-rw-r--r--blowfish.hpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/blowfish.hpp b/blowfish.hpp
index e0468cd..9a6e0fe 100644
--- a/blowfish.hpp
+++ b/blowfish.hpp
@@ -23,9 +23,7 @@ public:
constexpr Blowfish(const uint8_t key[], size_t keylen) {
for (size_t i = 0; i < BOXES; ++i) {
- for (size_t j = 0; j < ENTRIES; ++j) {
- S[i][j] = S_INIT[i][j];
- }
+ std::copy(S_INIT[i].begin(), S_INIT[i].end(), S[i].begin());
}
//
@@ -98,6 +96,6 @@ private:
return y;
}
- uint32_t P[SUBKEYS];
- uint32_t S[BOXES][ENTRIES];
+ std::array<uint32_t, SUBKEYS> P;
+ std::array<std::array<uint32_t, ENTRIES>, BOXES> S;
};