summaryrefslogtreecommitdiff
path: root/twofish.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2004-10-05 23:46:33 +0200
committerNiels Möller <nisse@lysator.liu.se>2004-10-05 23:46:33 +0200
commitb86af9e2187346298680391d38118973afa758b5 (patch)
treeabd096d1fad92e50c835a79777060bbf6772d896 /twofish.c
parent72e63b91469aae4438bcf78c7a767f46f36cb18c (diff)
downloadnettle-b86af9e2187346298680391d38118973afa758b5.tar.gz
(q_table): Use a const pointer array.
Rev: src/nettle/twofish.c:1.7
Diffstat (limited to 'twofish.c')
-rw-r--r--twofish.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/twofish.c b/twofish.c
index 9ebcf1b0..c7d05a13 100644
--- a/twofish.c
+++ b/twofish.c
@@ -199,10 +199,11 @@ compute_s(uint32_t m1, uint32_t m2)
* of the function h, cf. figure 2 of the twofish paper.
*/
-static const uint8_t * q_table[4][5] = { { q1, q1, q0, q0, q1 },
- { q0, q1, q1, q0, q0 },
- { q0, q0, q0, q1, q1 },
- { q1, q0, q1, q1, q0 } };
+static const uint8_t * const q_table[4][5] =
+ { { q1, q1, q0, q0, q1 },
+ { q0, q1, q1, q0, q0 },
+ { q0, q0, q0, q1, q1 },
+ { q1, q0, q1, q1, q0 } };
/* The matrix MDS as specified in section 4.3.2 of the twofish paper. */