More robust valid() in salted sha1 / nsldap formats.