Generate a random order-number

For one of my projects, I needed to generate a random order number that will be sent to customers in an email after they order. Lots of companies do that, it usually looks like this: Requirements Has to be all digits. Needs to be unique. We don’t want two orders to have the same order number. Has to be random - i.e. not enumerable. We don’t want the orders to be consecutive for example (5001, 5002, 5003, …) so that people can’t guess other orders numbers. »