In attempting to set a root password for vCenter, and using a password generation tool to make it more secure, the maximum length of password needs to be known.
vSphere vCenter 7.x and above.
There is no maximum for the root password for vCenter, as it is based on Photon OS. One can set a policy to set a maximum, but the default is no maximum.
Esxi has a default maximum of 40 characters per our vSphere documentation.
While there are NO maximums set by the OS, there may be limitations for tools used to sign in to the vCenter as root. There may also be restrictions in those tools as to character sets that can be passed. Please see the documentation for the tool you are using for any other restrictions on sending passwords in automation.