Does HWID have a maximum length?

In some scenarios, I need to know its size in advance to set up storage buffers, such as database fields.

16 * 4 * 4/3 = 86 bytes

And does license have a maximum length ?

Minimum size: “Key Length”/8 * 4/3. Don’t forget that a license can contain additional “/r/n” (for example VMProtect’s GUI does that).