hash generator helper