Skip to content

Instantly share code, notes, and snippets.

@mike3k
Created January 8, 2011 18:00
Show Gist options
  • Save mike3k/771028 to your computer and use it in GitHub Desktop.
Save mike3k/771028 to your computer and use it in GitHub Desktop.
This is just plain wrong.
NSData *encodeData(NSData *input) {
char encodeArray[512];
memset(encodeArray, '\0', sizeof(encodeArray));
encode([input length], (char *)[input bytes], sizeof(encodeArray), encodeArray);
return [NSData dataWithBytes:encodeArray length:strlen(encodeArray)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment