Security assist includes a random password generator that could be used to accomplish this.
With security assist installed, go to the bindings panel. Click the plus button, and select Security Assist -> Random Password.
in your cart, you will need to create a new column to hold the random number this column should be set to be unique.
In the add to cart button, select the new cart column, click the lightning bolt next to the random number column and select the Random Password binding from the binding panel.