Automate hash length