Research Article
An Explainable Password Strength Meter Addon via Textual Pattern Recognition
Algorithm 2
Keyboard patterns matching.
Input: S:a string. | Output: TRUE or FALSE. | (1) initialize:dict:for ever keyboard i,we map j that is adjacent to i. e.g.we map A,Z A,QA,S | A,WA,X for A. | (2) if S.length4 then | (3) return FALSE | (4) end if | (5) count = 0,string S1,string S2 | (6) for ;; do | (7) S1 = S[i]+S[i+1];S2 = S[i+1]+S[i] | (8) if S1 dict or S2 dict then | (9) count++ | (10) if count == S.length-1 then | (11) return TRUE | (12) else | (13) return FALSE | (14) end if | (15) end if | (16) end for |
|