Thanks Gerard, I should have thought it through a bit better :-) John Weller 01380 723235 07976 393631
> -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > Of Gérard Lochon > Sent: 21 December 2011 23:58 > To: [email protected] > Subject: Re: Alternatives to storing a user's password in your database > > > ----- Original Message ----- > > From: "John Weller" <[email protected]> > > > > Could you explain why there can only be 65128 different values? > > > At the first turn , you have 256 seeding possibilities. You randomize. > > Then you multiply this value (between 0 and 1) by an ascii code (between 0 > and 255), then take the integer of it ; > the minimum value of the result is 0 * 0 => 0, and the maximum value is 1 * > 255 => 255 , so this integer has also only 256 possibilities ! > At each turn you don't increase the number of possibilities for seeding > because you take the integer at the previous turn, and by induction it will > be so until the end. > > So, to calculate the number of possibilities, it is sufficient to examine > turn 1 and 2 (without integering the result as if turn 2 was turn 20). > > [VFP] > > CREATE CURSOR test (s1 c(1),s2 c(1), r1 n(10,8),r2 n(13,8)) > > FOR i = 0 TO 255 > FOR j = 0 TO 255 > INSERT INTO test VALUES (CHR(i),CHR(j),RAND(i),r1*j) > ENDF > ENDF > > SELECT COUNT(distinct r2) FROM test > > [/VFP] > > Oops, sorry it was 65281, not 65128 ; its better :o)))))))))))))))))) > > Gérard. > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

