Edit AllPages

CocoaFob is a set of helper code snippets for registration code generation and verification in Objective-C applications, integrated with registration code generation in Potion Store

The current implementation uses DSA to generate registration keys, which significantly reduces chances of crackers producing key generators for your software. Unfortunately, it also means the registration code can be quite long and has variable length.

To make registration codes human-readable, CocoaFob encodes them using a slightly modified base32 to avoid ambiguous characters. It also groups codes in sets of five characters separated by dashes. A sample registration code produced using a 512-bit DSA key looks like this:


One of the advantages of DSA is that for a given registration name, each generated code is different, as there is a random element introduced during the process.


CocoaFob, a random collection of code snippets as it is, provides the following for your application:

There is no framework or a library to link against. You include the files you need in your application project directly and are free to modify the code in any way you need.

You may also find other snippets of code useful, such as base32 and base64 encoding/decoding functions, as well as categories extending NSString and NSData classes with base32 and base64 methods.


The best way to get the latest version of the code is to clone the main Git repository:


You can also download the latest version from the CocoaFob home page at: