keyczar::Keyczar* crypter = keyczar::Crypter::Read(location); if (!crypter) return; crypter->set_compression(keyczar::Keyczar::ZLIB); std::string input = "Hey Alice, here is Eves message: [quote]"+superescape(evemessage)+"[/quote] Your Bob"; std::string ciphertext; bool result = crypter->Encrypt(input, &ciphertext);
(Just don't use compression with your encryption and avoid the issue entirely).