How do I convert a string, for example,
"To Infinity and Beyond!"
to a stream of binary digits? I want to implement DES encryption in Python. But this kind of encryption requires a plaintext size of 64 bits. The length of bits notwithstanding, how to do I actually convert it into a stream of bits for encryption?
Also, the conversion to bits should be such that post encryption, decryption can also be done effectively ( by bit conversion of even the ' ' in the string).
I would like to know how can this be accomplished in general.
'{0:b}'.format("") won't work.
So how do I do it?