Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

基于Base64编码/解码

From Wiki
Jump to: navigation, search
Article Metadata

文章
翻译:
hoolee
最后由 hamishwillee 在 22 Dec 2011 编辑


有时候在程序中需要维护Base64编码、Qutoed-Printeable以及UU格式的数据,在Symbian OS中只需三个简单类(多是从TImCodec派生的)即可应该应付说这些需求:

  • TImCodecB64 for Base64,
  • TImCodecQP for Quoted-Printable,
  • TImCodecUU for UU format.

Header file.

#include <imcvcodc.h>

MMP file.

LIBRARY   imut.lib

他们的使用方法相似,而且很简单:

void DoBase64Encoding(const TDesC8& aSourceData, TDes8& aEncodedData)
{
TImCodecB64 b64enc;
b64enc.Initialise();
b64enc.Encode(aSourceData,aEncodedData);
}

可以在这里找到相应代码NewLC

This page was last modified on 22 December 2011, at 04:57.
60 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×