I’ve added a new section to the website for little cocoa code snippets that might be useful to people. The first one is a category that extends NSData to provide AES encryption. This makes it really simple to have encrypted data for lightweight data stores. The OpenSSL version that ships with OS X is pretty out of date, unfortunately, and there is a bug with the CBC mode of AES in libCrypto that required me to do some custom block padding, but it’s not too big of a deal. Other algorithms (Blowfish, RC5, etc.) could be supported more easily than AES because they don’t suffer from this bug, but since Rijndael is the standard, I thought it was the best choice. Here’s to hoping we get a new version of OpenSSL with Leopard.
Posted by Lucas @ 8:22 pm
