×
Namespaces

Variants
Actions

基于Base64编码/解码

From Nokia Developer 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 07:57.
93 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.

×