Our Pin Delivery System allows for this: http://www.magentocommerce.com/magento-connect/Bahamabrands/extension/3905/pin_delivery_system
You can add serial numbers, passwords and pin numbers to existing and new products.
It allows for special characters in numeral and alpha numeral in pins, serials and passwords added.
If you have an existing site with products that you want to apply a special code to this will do that.
When the product is purchased the pin delivery system will send the unique codes to the customer via email and/or to the admin. The customer will also see the code on screen instantly after purchase.
This can work well for sites selling software using magento and other digital products that require serials or passwords.