diff options
Diffstat (limited to 'beecrypt/blowfish.c')
-rw-r--r-- | beecrypt/blowfish.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/beecrypt/blowfish.c b/beecrypt/blowfish.c index 9203ed1e4..7eaec7a69 100644 --- a/beecrypt/blowfish.c +++ b/beecrypt/blowfish.c @@ -324,7 +324,9 @@ static const blockMode blowfishModes[2] = { /* CBC */ (blockModeEncrypt) blowfishCBCEncrypt, (blockModeDecrypt) blowfishCBCDecrypt } }; +/*@-sizeoftype@*/ const blockCipher blowfish = { "Blowfish", sizeof(blowfishParam), 8, 64, 448, 32, (blockCipherSetup) blowfishSetup, (blockCipherSetIV) blowfishSetIV, (blockCipherEncrypt) blowfishEncrypt, (blockCipherDecrypt) blowfishDecrypt, blowfishModes }; +/*@=sizeoftype@*/ int blowfishSetup(blowfishParam* bp, const uint32* key, int keybits, /*@unused@*/ cipherOperation op) { @@ -336,8 +338,8 @@ int blowfishSetup(blowfishParam* bp, const uint32* key, int keybits, /*@unused@* uint32 work[2]; - memcpy(p, _bf_p, BLOWFISHPSIZE * sizeof(uint32)); - memcpy(s, _bf_s, 1024 * sizeof(uint32)); + memcpy(p, _bf_p, BLOWFISHPSIZE * sizeof(*p)); + memcpy(s, _bf_s, 1024 * sizeof(*s)); if ((keybits & 31) == 0) { |