NSData的转换为Base64 [英] Converting NSData to base64

查看:202
本文介绍了NSData的转换为Base64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何的NSData 转换为的base64 。我有的NSData ,想转换成的base64 我怎么能这样做呢?

How to convert NSData to base64. I have NSData and want to convert into base64 how can I do this?

推荐答案

修改

随着OS X 10.9 / iOS的7,这是建立在框架中。

As of OS X 10.9 / iOS 7, this is built into the frameworks.

请参阅 - [NSData的base64En codedDataWithOptions:]

此前iOS7 / OS X 10.9:

Prior to iOS7/OS X 10.9:

马特·加拉格尔写道关于这个题目的文章。在底部,他给一个链接到他的嵌入code的iPhone。

Matt Gallagher wrote an article on this very topic. At the bottom he gives a link to his embeddable code for iPhone.

在Mac上,你可以使用OpenSSL库,在iPhone上他写了自己的implement执行。

On the mac you can use the OpenSSL library, on the iPhone he writes his own impl.

这篇关于NSData的转换为Base64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆