string needs encoding before hashing