Or… “How I learned to stop worrying, and love Foundation.”
Forgive me, NSData. I was running around with that flashy [UInt8], acting like you didn’t have everything I need. I’ve learned my lesson.
— Rob Napier (@cocoaphony) September 28, 2015
I did a lot of writing and rewriting of the Swift version of RNCryptor. I struggled especially with what type to use for data. I gravitated quickly to
[UInt8] with all its apparent Swiftiness. But in the end, after many iterations, I refactored back to
NSData, and I’m really glad I did.
This is the story of why.