Skip to content

Instantly share code, notes, and snippets.

View grimley517's full-sized avatar

Brian Jones grimley517

View GitHub Profile
// Objective-C methods for Base64 conversion between NSString and NSData.
// Note: these do not support trailing '=' characters.
// License: Public Domain
// Author: Leonard van Driel, 2012
static unsigned char toBase64String[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static unsigned char toBase64Data[256] = {
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,