Hash generator from string