Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么方法可以对 iPhone SDK 中的数据进行 uuencode 编码?API 调用或库?
没有用于 uuencode 数据的内置 API,不,但算法非常简单(维基百科文章给出了很好的概述),并且世界上有很多 C 源代码(这里有一个看起来像的例子免费提供/可重复使用)。由于 uuencode 在字节级别上运行,因此 C 代码应该没问题……您可以直接从NSData获取字节,也可以使用NSString方法UTF8String和cStringUsingEncoding.
UTF8String
cStringUsingEncoding
如果您尝试转换二进制数据以便将其提交到网站,您可能需要考虑使用Base64(也在此处)。