This question has been asked and answered several times. I've looked at all 
the old answers and looked at the source code, but I am not able to get 
base32 to work with an alternative alphabet. I would like to use the 
RFC4648 alphabet rather than the DUDE alphabet. 

* 2011 Question - 
http://comments.gmane.org/gmane.comp.encryption.cryptopp/5778

    The alt_base32 files that Jeffrey Walton placed on the Cryptopp wiki 
have been removed from this URLhttp://www.cryptopp.com/wiki/File:RFC4648

* 2010 Question - 
http://comments.gmane.org/gmane.comp.encryption.cryptopp/5355 

    I get the same stack overflow as this poster when I try his source code.

* 2007 Question - 
http://cryptopp-users.narkive.com/WJrYwoW3/base-32-alphabet

    I can compile and run Wei's example source code without issue. However, 
it does not decode correctly.

Here's my current test code (based on Wei's 2007 answer). I've tried 
Initialize and IsolatedInitialize:

75 static const byte RFC4648_ALPHABET[] = 
"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
76 
77 CryptoPP::Base32Encoder b32encoder;
78 
b32encoder.IsolatedInitialize(CryptoPP::MakeParameters(CryptoPP::Name::EncodingLookupArray(),
79 (const byte *)RFC4648_ALPHABET,
80 false));
81 
82 static int decoding_array[256]; 
83 CryptoPP::Base32Decoder::InitializeDecodingLookupArray(decoding_array,
84 RFC4648_ALPHABET, 
85 32, 
86 true); // false = not case sensitive
87 
88 CryptoPP::Base32Decoder b32decoder;
89 
b32encoder.IsolatedInitialize(CryptoPP::MakeParameters(CryptoPP::Name::DecodingLookupArray(),
90 (const int*)decoding_array,
91 false));

If anyone on the list could show me how to properly implement an alternate 
alphabet with base32 in Cryptopp, I'd appreciate it. For now, I'm including 
Jeffrey Walton's old alt_base32 files with my source code. However, that's 
becoming too burdensome and I'd like to fix it the right way.

Thanks,

Brad


-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to