> On Jun 22, 2017, at 5:18 PM, Carl Hoefs <newsli...@autonomy.caltech.edu> > wrote: > > Is it possible to add encryption to this chain, so the movie file is written > out encrypted?
I’ve never seen any crypto stuff in AVFoundation (but it’s been a few years.) You’ll probably need to hook something in to run your own callbacks, and then write callbacks to do the encryption (e.g. using CommonCrypto or SecTransform.) (Warning: It’s easy to shoot yourself in the foot using crypto primitives, and end up with something that’s trivially breakable. For example, most block ciphers like AES have the “fun” property that if you ever encrypt two different messages with the same key and initialization vector, the encryption can be broken by XOR’ing the messages.) (Also, IIRC many media formats require random access during playback. Making an encrypted file format with random access capabilities turns out to be annoyingly hard; I had to do it a year or so ago.) —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com