support configurable code lengths

I'm planning on using this app to support Digits-style authentication so a 20 character code will not really do.
First step is allowing users to configure the code length.