[entropy.spm] convert string to bytes before passing it to hashlib objects