[sword-devel] using encryption with current osis2mod (r2435

Troy A. Griffitts scribe at crosswire.org
Tue Aug 25 16:21:45 MST 2009


I believe the problem is with RawText, but haven't had time to confirm.

My suspicion is that if you are building a compressed module,
enciphering should work.

Just to clear up a few things...

rawFilters get called (or should get called) when retrieving and when
setting text.

If there is still a problem, this is the line of code which should be
enciphering the data, so we need to see why it is not.

sword/src/modules/common/zverse.cpp:363

I haven't hunted down the equiv line in rawverse.cpp but suspect we just
never added the required 2 lines to readText and doSetText in this file
because when we've ever needed to release an enciphered module, it was
released as a compressed module.

Just my input...

	-Troy.





Ben Morgan wrote:
> On 26/08/2009, *DM Smith* <dmsmith at crosswire.org
> <mailto:dmsmith at crosswire.org>> wrote:
> 
>     It does not work.
> 
>  
> We found this out a while ago, didn't we?
> 
>  
> 
>     The code that has been there forever, no longer works. I checked out
>     revision 1929 from June 2006 and with minor changes, compiled it
>     against the current SWORD library. It has the same problem.
> 
>     That code is:
>            SWFilter *cipherFilter = 0;
> 
>            if (!cipherKey.empty()){
>                    fprintf(stderr, "Adding cipher filter with phrase:
>     %s\n", cipherKey.c_str() );
>                    cipherFilter = new CipherFilter(cipherKey.c_str());
>                    module->AddRawFilter(cipherFilter);
>            }
> 
> The rawfilters are run when text is taken out, not put in. So
> the cipherfilter will never be run.
>  
> 
>     This is the same that is used in mod2zmod and tei2mod.
>     Interestingly, cipherraw works entirely differently.
>      
> 
>     I don't have a good environment to debug it and would appreciate
>     someone to look at it. The basic idea is that the cipher is used on
>     the raw text of a verse to create a jumbled string of the same length.
> 
>  
> If no one else does, I can probably look at this in a few hours...
> 
> Then there is the question of why Jonathan has it working... Are you
> sure cipherraw hasn't been near the module? Unmodified code from SVN?
> 
> God Bless,
> Ben
> -------------------------------------------------------------------------------------------
> Multitudes, multitudes,
>     in the valley of decision!
> For the day of the LORD is near
>     in the valley of decision.
> 
> Giôên 3:14 (ESV)
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list