Thanks for this encryption code, Otis!

All along I've been skeptical about issues comparing strings, especially since 
I would get them from JSME. Now I figured out how to get JSME to spit out 
SMILES with slashes for E/Z stereochem. And I see that comparing those strings 
is a big problem.  Even JavaScript hiccups on the backslashes. 

Mike, if you're willing to share hidden div Jmol SMILES comparison code with 
me, I'd appreciate it. And I'm psyched to see the cool stuff you're doing with 
ChemDoodle and curly mechanism arrows on your site. 
Jennifer

Sent from my iPhone

> On Jul 20, 2016, at 5:12 PM, Otis Rothenberger <osrot...@icloud.com> wrote:
> 
> Mike and Jennifer,
> 
> Previous chain getting too long (bounce long!), and none of us truncated - 
> sorry!
> 
> Re Quiz Answers, Shhhh, tell no one...
> 
> This is a classic encryption technique that’s weak and easy for 
> cryptographers to break. Your students will never figure it out! It makes use 
> of the obscure (and obtuse) XOR logic operator (^). Basically, it diddles 
> ascii character binary bits in such a way that the encryption and decryption 
> functions are one and the same. The encrypted data (see code below) is stored 
> in globalAnswerHolder. While this is a string, don’t try to view it. It can 
> contain many non-printable characters. The intKey argument is simply an 
> integer encryption key - e.g. 100. Actually, it’s the integer’s binary 
> equivalent that is the key.
> 
> var globalAnswerHolder;
> function encryptAndDecrypt(strDataToProcess, intKey) {
>    var strBuilder = "";
>    for(i=0;i < strDataToProcess.length;i++) {
>        strBuilder += String.fromCharCode(intKey ^ 
> strDataToProcess.charCodeAt(i));
>    }
>    globalAnswerHolder = strBuilder;
> }
> 
> Just pass globalAnswerHolder through the function again to decrypt.
> 
> Of course your students could do this also, so obscure the function:
> 
> var theBoyCouldPlay;
> function Ish(Mark, Knopfler) {
>    var Kabbible = "";
>    for(i=0;i < Mark.length;i++) {
>        Kabbible += String.fromCharCode(Knopfler ^ Mark.charCodeAt(i));
>    }
>    theBoyCouldPlay = Kabbible;
> }
> 
> Your students will be in Comedic Dire Straits (ouch)!
> 
> Otis
> --
> Otis Rothenberger
> o...@chemagic.org
> http://chemagic.org
> 
> 
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to