Auto detect hash algo based on validation key length