Convert encrypted bit string type in client

This fixes a segmentation fault caused by an incorrect string encoding
when run in Python 2.7.