Sunday, 8 September 2013

Reading in 64 byte chunks from a file in C

Reading in 64 byte chunks from a file in C

I can't seem to wrap my head around this concept of reading in 64byte
chunks, then using the blowfish, BF_cfb64_encrypt(source, newto,
sizeof(source), &bf_key, iv, &enc, BF_DECRYPT) function to encrypt? it. I
know how to use the BF function, but reading in 64 bytes, from say a 4096
byte file is my confusion. Any tips or suggestions would be greatly
appreciated. My understanding is that 1 char is a byte, so does that mean
I simply keep a count and when char count is 8 then that means I have read
64 bytes, hence encrypt, then write to file, and repeat until the entire
file is parsed?

No comments:

Post a Comment