Allow String input for hashSync, added hashSync test cases