0

如何从 cryptopp::integer 转换为 QString?

如果这很重要,我会在 Mac OS 上工作。我完全不知道该怎么做,只是尝试使用 QCA,但这还不够好!

4

2 回答 2

1

如何从 cryptopp::integer 转换为 QString?

你也可以这样做:

CryptoPP::Integer i = 1;
i <<= 128;
i--;
i *= 3;

ostringstream oss;
oss << std::hex << i;

QString qs(oss.str().c_str());
于 2014-02-01T03:45:34.073 回答
0

根据您对我的评论的反馈,您似乎需要三个步骤。

1) 调用BitCount()方法获取整数的位数。

2)然后,您可以使用该GetBits()方法获取所有位。

3) 完成后,您可以调用使用QString::number() method to get the actual integer into the desiredQString` 作为静态方法的返回值。

于 2013-12-23T06:29:53.270 回答