*
*/
-#include <stddef.h>
+#include "modes.h"
#include <string.h>
#ifndef MODES_DEBUG
#endif
#include <assert.h>
-#include "modes.h"
-
#define STRICT_ALIGNMENT
#if defined(__i386) || defined(__i386__) || \
defined(__x86_64) || defined(__x86_64__) || \
void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t len, const void *key,
unsigned char ivec[16], int *num,
- block_f block)
+ block128_f block)
{
unsigned int n;
size_t l=0;
#endif
while (len>=16) {
(*block)(ivec, ivec, key);
- for (n=0; n<16; n+=sizeof(size_t))
+ for (; n<16; n+=sizeof(size_t))
*(size_t*)(out+n) =
*(size_t*)(in+n) ^ *(size_t*)(ivec+n);
len -= 16;
out += 16;
in += 16;
+ n = 0;
}
- n = 0;
if (len) {
(*block)(ivec, ivec, key);
while (len--) {