If you're building a serial key registration routine into your Mac software, you'd want to look for solutions that offer a Web-based keygen script, where you would upload that script to your Web site, and our server would hit that script's URL to obtain a code for us to provide to the buyer.
If you just want something that will generate an arbitrary, random key and provide that to both the buyer and you (and/or send it to a Web script you have programmed to receive that code and do something custom with it), you might just use our built-in Armadillo keygen script:
http://www.e-junkie.com/ej/help.keygen.htm#armadillo