Forum de discussion
Forum « Programmation ASP » (archives)
Re: Cryptage de mot de passe ou l'art de l'encodage
Envoyé: 30 novembre 2005, 8h04 par flo456
alors il faut que je le crypte pour pas qu on puisse le voir!
mon code est celui la :
<% Dim tbloalphabetique[26], tblocryptage[26]
tbloaphabetique[0] = "a"
tbloaphabetique[1] = "b"
tbloaphabetique[2] = "c"
tbloaphabetique[3] = "d"
tbloaphabetique[4] = "e"
tbloaphabetique[5] = "f"
tbloaphabetique[6] = "g"
tbloaphabetique[7] = "h"
tbloaphabetique[8] = "i"
tbloaphabetique[9] = "j"
tbloaphabetique[10] = "k"
tbloaphabetique[11] = "l"
tbloaphabetique[12] = "m"
tbloaphabetique[13] = "n"
tbloaphabetique[14] = "o"
tbloaphabetique[15] = "p"
tbloaphabetique[16] = "q"
tbloaphabetique[17] = "r"
tbloaphabetique[18] = "s"
tbloaphabetique[19] = "t"
tbloaphabetique[20] = "u"
tbloaphabetique[21] = "v"
tbloaphabetique[22] = "w"
tbloaphabetique[23] = "x"
tbloaphabetique[24] = "y"
tbloaphabetique[25] = "z"
tblocryptage[4] = "a"
tblocryptage[15] = "b"
tblocryptage[12] = "c"
tblocryptage[1] = "d"
tblocryptage[11] = "e"
tblocryptage[19] = "f"
tblocryptage[0] = "g"
tblocryptage[16] = "h"
tblocryptage[10] = "i"
tblocryptage[9] = "j"
tblocryptage[5] = "k"
tblocryptage[22] = "l"
tblocryptage[13] = "m"
tblocryptage[18] = "n"
tblocryptage[20] = "o"
tblocryptage[8] = "p"
tblocryptage[23] = "q"
tblocryptage[2] = "r"
tblocryptage[24] = "s"
tblocryptage[21] = "t"
tblocryptage[25] = "u"
tblocryptage[17] = "v"
tblocryptage[3] = "w"
tblocryptage[6] = "x"
tblocryptage[7] = "y"
tblocryptage[14] = "z"
Function encrypte(pass)
pass = trim(pass)
pass = lcase(pass)
for i = 0 to 25
pass = replace(pass, tbloaphabetique[i], tblocryptage[i])
next i
encryptage = pass
end function Function
Function decrypte(pass)
pass = trim(pass)
pass = lcase(pass)
for i = 0 to 25
pass = replace(pass, tblocryptage[i], tbloaphabetique[i])
next i
decryptage = pass
end function %>
et je ne sais pas comment l utiliser.. et pour info, c est moi qui l est fait..
j aimerais juste savoir comment employé tout ca..
Réponses
|