Skip to content

Commit

Permalink
The block size may be something other than 8!
Browse files Browse the repository at this point in the history
  • Loading branch information
levitte committed Jan 2, 2002
1 parent 4092869 commit c938563
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crypto/evp/evp_locl.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@
/* Wrapper functions for each cipher mode */

#define BLOCK_CIPHER_ecb_loop() \
unsigned int i; \
if(inl < 8) return 1;\
inl -= 8; \
for(i=0; i <= inl; i+=8) \
unsigned int i, bl; \
bl = ctx->cipher->block_size;\
if(inl < bl) return 1;\
inl -= bl; \
for(i=0; i <= inl; i+=bl) \

#define BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \
static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
Expand Down

0 comments on commit c938563

Please sign in to comment.