4 ms·
There's a much easier way to build the same functionality: use encrypted sparse disk images. See the `hdiutil` command line tool. I used this many years ago to
by SeoxyS 13y ago
There's a much easier way to build the same functionality: use encrypted sparse disk images. See the `hdiutil` command line tool.
I used this many years ago to build a Mac app with the exact same functionality, and probably much safer encryption: http://excesapp.com/ http://excesapp.com/
- eliteraspberrie 13y agoHow does your app derive a key from the user's password?
- SeoxyS 13y agoIt doesn't; I leave it to Apple's code to handle the encryption aspect. That said, I'd imagine that it uses PBKDF2 to derive a key from the password. The content itself is encrypted with AES-256. Here's what `man hdiutil` has to say about it: -encryption [AES-128|AES-256] As of 10.7, the default algorithm is the AES cipher running in CBC mode on 512-byte blocks with a 128-bit key. -- Not sure why I'm being downvoted for sharing this. Go figure, HN can be mean sometimes.
- eliteraspberrie 13y agoThat's a good way of doing it. I would have prefered scrypt but PBKDF2 is good enough. (Something changed with HN recently, I get the downvotes too.)