[OT] programming question

Nicholas Clark nick at ccl4.org
Thu Apr 26 13:44:03 BST 2007


On Thu, Apr 26, 2007 at 06:56:47AM +0100, Smylers wrote:
> David Cantrell writes:
> 
> > > So what's the best way to randomly permute the order of the answers,
> > > store a small amount of state in a hidden field in the form, and
> > > reproduce the permutation back on the next call to the server, such
> > > that it can map back to the original answer order, without (too
> > > much) information leakage?
> > 
> > md5(correct answer plus sekrit) inna bun^Whidden field
> 
> That's what I was about to suggest, too.
> 
> But it does have the disadvantage that while you can tell whether the
> user was correct (and you can inform them what the correct answer for
> the question is), you can't give feedback like:
> 
>   Sorry, that's incorrect.  You chose "Foggy" but the correct answer is
>   "Compo".
> 
> Which may or may not be important.

I think that it was important to me. (Although not quite in that sense -
I merely wanted to record all the answers).

Nicholas Clark


More information about the london.pm mailing list