Agreed RE length and nil out argument checking. As I didn't write this code (and don't use crypt in my BNRPersistence-based apps) hadn't really looked at it before. The leaks jumped out, so fixed 'em. But your points are good ones. Dereferencing a ** without a nil check is just asking to be shot down.