bugfix: python3 requires strings to be encoded before hashing

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>