I need an implementation of the Blowfish encryption algorithm for a 64 bit (= 8 byte) block and a 64 bit (= 8 byte) key K.
The program must take a single command line argument of the key in hex (16 hex chars).
It then reads the message as ASCII chars from std input until end-of-file on standard input.
Each block is 8 characters (64 bits) split into 2 32-bit pieces L and R; the final block is to be extended with bytes of 0 [the C character '\0'] if needed. The output is to be printed to the screen as hexadecimal bytes.
This is for learning purposes only. It does not need to be implemented into anything. I would like it done in either C/C++ or Java, so I can learn from it.
I have a larger explanation that I can send you if things are unclear, I also have a file that contains an example output.
Looking forward to working with you.