Re: NSData base64Encoding vs. base64EncodedStringWithOptions


Alex Zavatone
 

On Apr 13, 2018, at 12:05 PM, Ben Kennedy <ben-groups@...> wrote:

On Apr 13, 2018, at 9:39 AM, Alex Zavatone <zav@...> wrote:

- What did the deprecated base64Encoding do with the line endings? How long were lines and what happened at a line ending?
I haven't tested this, but I would imagine that it produced no line endings at all (i.e., a string containing only base64 alphabet).

The typedef for NSDataBase64EncodingOptions, 0 is given the text, NSDataBase64Encoding64CharacterLineLength, indicating that a line is 64 characters.
No it doesn't:

NSDataBase64Encoding64CharacterLineLength = 1UL << 0,
The enum defines a bit mask. The above declaration contains a shift. It equals 1.

-ben
DOH. I think it’s time for me to update my glasses prescription.

Thank you.

Join {cocoa@apple-dev.groups.io to automatically receive all group messages.