This sounds a little dangerous. If you're looking for random bytes you can get them by reading /dev/random. If you are looking for good entropy to feed something else, you might just want to pull bytes from the random device on a busyish web server. The network interface(s) will give the random number generator a lot to work with.
You could also utilize a number of good existing libraries for these functions. For example darwin's libc includes the random routine (don't use rand). This guy implemented a bunch of PRNGs in Cocoa:
http://www.mactech.com/articles/mactech/Vol.22/22.03/RandomCocoa Python comes with it's own Mersenne Twister PRNG. This python script will get you what you are asking for (from terminal):
Code:
#!/usr/bin/python
import random
# Setting
lineLimit=1024
# Init
linesPrinted=0
random.seed()
while (linesPrinted < lineLimit):
# 33-127 is the range of pritable ASCII chars
print chr(random.randrange(33, 127, 1))
linesPrinted += 1
Finally, you might want to have a look at
APG, it's a well known, secure, well reviewed, multi-platform, free, open source password generator which is available in both standalone and client/server versions. It could use a good iPhone or Cocoa front end.
I personally got burned once by writing my own cipher with an integral PRNG. It was broken in minutes by a semi-talented cracker. There are a lot of pitfalls and easy mistakes to make when you're working with that stuff, so I try avoid doing it myself these days.