Move away from the random string api.
Fixes from Steve's review
encoded bytes
Merge pull request #407 from arlolra/bits

Move away from the random string api.