[entropy.client] use const_convert_to_rawstring with hashlib

This fixes bug #4713