Fixed python3 related lack of encoding in the digest test