如何从 cryptopp::integer 转换为 QString?
如果这很重要,我会在 Mac OS 上工作。我完全不知道该怎么做,只是尝试使用 QCA,但这还不够好!
如何从 cryptopp::integer 转换为 QString?
你也可以这样做:
CryptoPP::Integer i = 1;
i <<= 128;
i--;
i *= 3;
ostringstream oss;
oss << std::hex << i;
QString qs(oss.str().c_str());
根据您对我的评论的反馈,您似乎需要三个步骤。
1) 调用BitCount()
方法获取整数的位数。
2)然后,您可以使用该GetBits()
方法获取所有位。
3) 完成后,您可以调用使用QString::number() method to get the actual integer into the desired
QString` 作为静态方法的返回值。