implement hash string