将 NSData 转换为 base64

Converting NSData to 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?

解决方案

EDIT

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

See -[NSData base64EncodedDataWithOptions:]


Prior to iOS7/OS X 10.9:

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

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

这篇关于将 NSData 转换为 base64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:将 NSData 转换为 base64

基础教程推荐