As it turns out, only this change appears to be needed:
diff --git a/blowfish.cpp b/blowfish.cpp
index e615da3b..12213c0e 100644
--- a/blowfish.cpp
+++ b/blowfish.cpp
@@ -70,7 +70,7 @@ void Blowfish::Base::crypt_block(const word32 in[2],
word32 out[2]) const
void Blowfish::Base::ProcessAndXorBlock(const byte *inBlock, const byte
*xorBlock, byte *outBlock) const
{
- typedef BlockGetAndPut<word32, BigEndian> Block;
+ typedef BlockGetAndPut<word32, LittleEndian> Block;
word32 left, right;
Block::Get(inBlock)(left)(right);
But I'd like to do a proper pull request and have this upstream. I'm
guessing the way to go is to add a new BlowfishCompat class, like XTEA
is for TEA? In which case we need to think about the statics in
bfinit.cpp, we probably don't want to copy-paste them.
Or can we somehow add a parameter to the current Blowfish class
somewhere to switch on the compat behaviour when needed?
Thanks,
Razvan