【问题标题】:How to get length of base64 string from base64decode?如何从base64decode中获取base64字符串的长度?
【发布时间】:2015-09-05 11:05:05
【问题描述】:

base64Decode() 返回 0。它没有给出正确的输出。这是我的代码:

std::string source="iVBORw0KGgoAAA/j7..";
int len = 0;
unsigned char *buffer;
len = base64Decode((unsigned char*)source.c_str(), (unsigned int)source.length(), &buffer);

【问题讨论】:

标签: cocos2d-x


【解决方案1】:

“\”不包含在 Base64 中。 添加一个严格的参数,用于检查您的字符串是否包含 base64 范围之外的字符。 之后发布你的结果:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 2019-05-12
    • 1970-01-01
    相关资源
    最近更新 更多