62 #ifndef STRICT_ALIGNMENT
63 # define STRICT_ALIGNMENT 0
67 size_t len,
const void *
key,
71 const unsigned char *iv = ivec;
73 assert(in && out && key && ivec);
75 #if !defined(OPENSSL_SMALL_FOOTPRINT)
77 ((
size_t)in|(
size_t)out|(
size_t)ivec)%
sizeof(
size_t) != 0) {
80 out[n] = in[n] ^ iv[n];
81 (*block)(out, out,
key);
89 for(n=0; n<16; n+=
sizeof(size_t))
91 *(
size_t*)(in+n) ^ *(
size_t*)(iv+n);
92 (*block)(out, out,
key);
101 for(n=0; n<16 && n<
len; ++n)
102 out[n] = in[n] ^ iv[n];
105 (*block)(out, out,
key);
116 size_t len,
const void *
key,
120 union {
size_t align;
unsigned char c[16]; } tmp;
122 assert(in && out && key && ivec);
124 #if !defined(OPENSSL_SMALL_FOOTPRINT)
126 const unsigned char *iv = ivec;
129 ((
size_t)in|(
size_t)out|(
size_t)ivec)%
sizeof(
size_t) != 0) {
131 (*block)(in, out,
key);
142 (*block)(in, out,
key);
143 for(n=0; n<16; n+=
sizeof(size_t))
144 *(
size_t *)(out+n) ^= *(
size_t *)(iv+n);
154 ((
size_t)in|(
size_t)out|(
size_t)ivec)%
sizeof(
size_t) != 0) {
157 (*block)(in, tmp.c,
key);
158 for(n=0; n<16; ++n) {
160 out[n] = tmp.c[n] ^ ivec[n];
171 (*block)(in, tmp.c,
key);
172 for(n=0; n<16; n+=
sizeof(size_t)) {
173 c = *(
size_t *)(in+n);
175 *(
size_t *)(tmp.c+n) ^ *(
size_t *)(ivec+n);
176 *(
size_t *)(ivec+n) = c;
187 (*block)(in, tmp.c,
key);
188 for(n=0; n<16 && n<
len; ++n) {
190 out[n] = tmp.c[n] ^ ivec[n];