move hash string to int function to common