Note that creating unique number arrays can cause performance issues as the existing selection must be first examined for instances of the next random number to place within.

JFRandom also generates random NSData instances…

NSData *data = [JFRandom generateRandomDataOfLength: 16];

If you need the bytes to be signed rather than unsigned…

NSData *data = [JFRandom generateRandomSignedDataOfLength: 16];

And of course if you need a string full of random characters it’s this easy…

NSString *text = [JFRandom generateRandomStringOfLength: 64];

These are the basic capabilities of JFRandom. There are a few more methods that allow for randomly picking of numbers within a pre-determined array etc… Check out JFRandom now and save yourself the trouble of coding and testing this yourself!