The block size may be something other than 8!
This commit is contained in:
parent
40928698bb
commit
c938563a81
@ -61,10 +61,11 @@
|
|||||||
/* Wrapper functions for each cipher mode */
|
/* Wrapper functions for each cipher mode */
|
||||||
|
|
||||||
#define BLOCK_CIPHER_ecb_loop() \
|
#define BLOCK_CIPHER_ecb_loop() \
|
||||||
unsigned int i; \
|
unsigned int i, bl; \
|
||||||
if(inl < 8) return 1;\
|
bl = ctx->cipher->block_size;\
|
||||||
inl -= 8; \
|
if(inl < bl) return 1;\
|
||||||
for(i=0; i <= inl; i+=8) \
|
inl -= bl; \
|
||||||
|
for(i=0; i <= inl; i+=bl) \
|
||||||
|
|
||||||
#define BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \
|
#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) \
|
static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user