Sh*t my brain says and forgets about

Tag: Swift

You’re Doing AES Encryption Wrong

Well, it’s possible you’re doing it properly … but likely not. At CocoaConf Chicago Rob Napier gave a presentation on iOS security and highlighted his cross-platform AES encrypt/decrypt library, RNCryptor. You’ll find implementations for Swift, Objective-C, Java, PHP, C, JavaScript, Haskell, Go, and many more.

Do you know what password stretching, CBC, PBKDF2, and IVs are? If you’ve said no to any of these, you should probably look at RNCryptor.

Check it out!

Featured image courtesy of Flickr user cyberhades https://www.flickr.com/photos/cyberhades/20711405390

UIKit Dynamics – Turning on Debug Mode

In iOS 9 Apple has introduced a number of new shiny things for UIKit Dynamics. One of them is UIFieldBehavior which describes magnetic, electrical and spring fields of influence. Fields are hard to debug (even in real life!) so Apple decided to provide a debug mode on UIDynamicAnimator. The trick is the debug mode isn’t published in the headers. Why? Who knows. They mentioned it quite plainly at WWDC 2015 and said you have to turn it on in the LLDB debugger.

I found an easier and more straightforward way. Just use key-value coding! UIDynamicAnimator still inherits from NSObject so the KVC helper methods are still there.

https://gist.github.com/astralbodies/f346b07e7788f2c975a4

Easy!

Powered by WordPress & Theme by Anders Norén