FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour patternlock
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
patternlock
Posted: Sun Aug 22, 2021 07:51 AM
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: patternlock
Posted: Sun Aug 22, 2021 09:17 AM
Dear Otto,

I think that the amount of possibilities is low, so users may "guess" other users on several tries

Code (fw): Select all Collapse
function Main()

   ? NCombinations( 9, [from 3 to 9] )

   // and I think the above is not correct as several solutions may be impossible

return nil

function NFactorial( n )

   local nResult  := 1
   local x
   
   for x = n to 1 step -1
      nResult := nResult * x
   Next x

return nResult

function NCombinations( n, m )

return nFactorial( n ) / ( nFactorial( m ) * nFactorial ( n - m ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: patternlock
Posted: Sun Aug 22, 2021 09:25 AM
Dear Antonio,
Thank you.
Maybe you can post an example that is safe and works.
It would be great.
Thanks in advane.
Best regards,
Otto

Edit:
I did some more tests and I think it is save but you have to tune it.


Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: patternlock
Posted: Sun Aug 22, 2021 10:32 AM

Dear Otto,

I think that 4 x 4 dots would be safer

Android uses it (I would say it is 4x4 also)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion