Version 0 of easyPasswd

Updated 2006-02-17 10:07:32

if {0} {

LM 2006-02-17

Just an idea during my car travel back home.

My two survival brain cells cannot remember strength password no more. But everyone knows that easy to remember passwords are very easily cracked.

So here is my very poor valuable solution.

You can complicate as you like mapPasswd proc and adapt it to your mental mechanisms (for mine letters, numbers and other character have to be splitted), than continue to type your "goofy&donaldduck" easy to remember password.

A copy & past operation and my brain cells are save.

Undoubtedly the following mapPasswd is not the procedure that I use normally ;)

Comments, suggestions and positive critics are always accepted.

}

 package require Tk

 proc mapPasswd {easy} {
         set map1 "abcdefghijklmnopqrstuvwxyz"
         set map2 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
         set map3 "1234567890"
         set map4 "+*-_%&£^?!|\\\$\'\"\/\%\[\]\(\)\;\,\:\."
         set easylist [split $easy {}]
         set hardlist {}
         set magicNum 3
         foreach e $easylist {
                 foreach m [list $map1 $map2 $map3 $map4] {
                         if {[set idx [string first $e $m]] != -1 } {
                                 set len [string length $m]
                                 lappend hardlist [string index $m [expr {($idx + $magicNum) % $len}]]
                                 break
                         }
                 }
         }
         return [join $hardlist ""]
 }


 proc mainGui {} {
     set f1 [frame .easy]

     label $f1.epLbl -width 15 -text "Easy Password"
     entry $f1.epEnt -width 40 -textvariable easyPasswd
     button $f1.epBtn -text "Harden it" -width 10 \
                         -command { set hardPasswd [mapPasswd $easyPasswd] }
     pack $f1.epLbl $f1.epEnt $f1.epBtn -side left

     set f2 [frame .hard]
     label $f2.hpLbl -width 15 -text "Hard Password"
     entry $f2.hpEnt -width 40 -textvariable hardPasswd -state readonly
     pack $f2.hpLbl $f2.hpEnt -side left

     pack $f1 $f2 -anchor w

 }

 set easyPasswd ""
 set hardPasswd ""
 mainGui