私は:Base32クラスに別のアルファベットを使用するにはどうすればよいですか? pythonで
encoded = base64.b32encode("1ACC64E9510C32CE8E34".decode('hex'))
私はDLGGJ2KRBQZM5DRU
を取得します。 Crypto ++について:
std::string decoded2;
std::string first_20="1ACC64E9510C32CE8E34";
StringSource ssv(first_20, true /*pumpAll*/,
new HexDecoder(
new StringSink(decoded2)
) // HexDecoder
); // StringSource
boost::algorithm::to_lower(decoded2);
StringSource ss(decoded2, true,
new Base32Encoder(
new StringSink(hash_sink)
) // Base64Decoder
); // StringSource
std::cout<<"encoded raw:"<<hash_sink<<std::endl;
私はDMGGJ4MTBS3N7DTW
が間違っています。
上記の文字列をC++でエンコードして、Pythonと同じ結果を得る方法はありますか?
ヘッダーファイルを使用して常にコードを投稿してください。 (私はdownvoteをしなかった)。 – Arash
ヘッダファイルは 'の#include の#include の#include の#include の#include の#include する#include <ブースト/ program_options.hpp> の#include する#include <ブースト あります/include using namespace std; /algorithm/string/case_conv.hpp> #include ' –
の#include の#include の#include の#include の#includeは、どのようにこの質問は、任意の研究努力が表示されませんか? 私はcryptoppの問題追跡ツールについて尋ねましたが、それらの関数は同じではないと言っています[github](https://github.com/weidai11/cryptopp/issues/534) –