Reading Bits From Files
I am playing about with some encryption which needs to perform permutations and use S-Boxes on a 64 bit block. It's pretty similar to DES.
The problem is not with the method which encrypts the block, which is easy to write. But the fact that we must swap bits around means that the primitive data types are not suitable for storing the block and we must use a boolean array or bitset. My problem is how to retrieve information from a file bit-by-bit rather than byte-by-byte. I want to avoid writing a conversion method from bytes to boolean array.