Added encode() before hashing