Register by ''promotional codes'' only

Hey, i am trying to make a ''promo code'' system in my PRIVATE webpage. This means, to register (in the form) you should need to fill a ''promo code'' otherwise you can't register.

I have 0 idea how to do that, I guess, I need some kind of plugin that would generate promo codes, and add this a new parametter for user register.

I know that registration by email only exists, but I really would like to make this with CODES.