summaryrefslogtreecommitdiffstats
path: root/crypto_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto_buffer.c')
-rw-r--r--crypto_buffer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto_buffer.c b/crypto_buffer.c
index d17e805..5d7cadb 100644
--- a/crypto_buffer.c
+++ b/crypto_buffer.c
@@ -9,12 +9,12 @@ int crypto_buffer_init(crypto_buffer *s, int fd, operation op, u32 blocks, int t
{
int ret;
int size;
-
+
if(blocks<3) return -1; /* magic + info + data */
-
+
s->fd = fd;
s->op = op;
-
+
if(type & BLOWFISH){
size = BF_BLOCK_SIZE;
ret = blowfish_setkey((struct blowfish_ctx*)&s->ctx, key, key_len, 0);
@@ -49,7 +49,7 @@ int crypto_buffer_init(crypto_buffer *s, int fd, operation op, u32 blocks, int t
if(ret!=0) return -1;
if((U32_MAX / size) < blocks) return -1;
-
+
s->block_size = size;
s->e_len = size * blocks; /* TODO check overflow */
s->data_st.bytes = s->data_st.strlen = 0;
@@ -71,7 +71,7 @@ int crypto_buffer_init(crypto_buffer *s, int fd, operation op, u32 blocks, int t
s->e_ptr = s->e_buffer + (size << 1);
s->e_len -= (size << 1);
}
-/*
+/*
fprintf(stderr,"e_buffer : %x\n",s->e_buffer);
fprintf(stderr,"e_data : %x\n",s->e_data);
fprintf(stderr,"e_ptr : %x\n",s->e_ptr);