Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to Store LoginId/Password?
Message
De
01/07/2004 15:55:17
 
 
À
01/07/2004 12:33:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00919101
Message ID:
00919828
Vues:
10
Tracy,

>Maybe someone who enjoys alittle 'fun' with coding will modify it to increase its encryption level... that would be interesting! I haven't looked at it since a year ago when I had to make a quick minor change. I've always meant to go back and change it to make it more secure. It's years old, well...maybe one day. It would make a neat little UT fun task I think. Maybe it could be posted under chatter for fun for anyone that wants to volunteer to modify it...

Actually I didn't "increased its encryption level", but got some ideas playing with the routines you sent me.

Based on the premise that if someone *really* wants to hack something it will do it, I created a very basic routine to perform "string messing", just to make things not "quite obvious"

Thank you so much Tracy, you really put some light in the problem I was facing

Regards,

Fernando
Dimension TabStrings [6]

TabStrings [1] = "MyPassord"
TabStrings [2] = "This one works"
TabStrings [3] = "But this one doesn't!"
TabStrings [4] = "This one works: 0a1b2c"
TabStrings [5] = "This one doesn't: 00a11b22c"
TabStrings [6] = "adm003216"

For I = 1 to 6

    cOrigPass = TabStrings [I]
    cObjtPass = HideString (cOrigPass)
    cBackPass = HideString (cObjtPass)

    Messagebox ("cOrigPass [" + lTrim (Str (Len (cOrigPass))) + "]: [" + cOrigPass + "]" + Chr (13) + ;
                "cBackPass [" + lTrim (Str (Len (cBackPass))) + "]: [" + cBackPass + "]" + Chr (13) + ;
                "cObjtPass [" + lTrim (Str (Len (cObjtPass))) + "]: [" + cObjtPass + "]" )
 EndFor

 Procedure HideString 
*--------- ----------
 LParameters pSourceString
 Private     cSourceString, cResultString, cChars, nPattern, I
 
 cSourceString = AllTrim (pSourceString)
 cChars       = ""

 For I = 1 To 255
     cChars = cChars + Chr (255-I)
 EndFor

 cResultString = ""

 For I = 1 To Len (cSourceString)
     cResultString = cResultString + Substr (cChars, Asc (Substr (cSourceString, I, 1)), 1)
 EndFor

 Return cResultString

 EndProc                         &&  Of HideString
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform