Is there any neat trick to slice a binary number into groups of five digits in python?
'00010100011011101101110100010111' => ['00010', '00110', '10111', ... ]
Edit: I want to write a cipher/encoder in order to generate "easy to read over the phone" tokens. The standard base32 encoding has the following disadvantages:
- Potential to generate accidental f*words
- Uses confusing chars like chars like 'I', 'L', 'O' (may be confused with 0 and 1)
- Easy to guess sequences ("AAAA", "AAAB", ...)
I was able to roll my own in 20 lines of python, thanks everybody. My encoder leaves off 'I', 'L', 'O' and 'U', and the resulting sequences are hard to guess.