added registration-codes generation functionality

@chrisndodge I have added the Ex-32 functionality. Kindly review the changes. 

Thanks