字符串加密

使用字符串加密_第1张图片

char* HelloWorld::encode(const char* srcInfo)
{
	int srcLen = strlen(srcInfo);
	int outLen = srcLen*2;
	char* ch = new char ;

	CCCrypto::encodeBase64(srcInfo, srcLen, ch, outLen );

	return ch;
}

char* HelloWorld::decode(const char* srcInfo)
{
	int srcLen = strlen(srcInfo);
	char* ch = new char ;
	CCCrypto::decodeBase64(srcInfo, ch,srcLen);
	return ch;
}


你可能感兴趣的:(字符串加密)