Voila je voulais savoir si il étais possible de changer ce petit code VB.net en
VB6 :
PublicFunction CryptPassword(ByVal Key AsString, ByVal Password AsString) AsString
Dim HASH AsChar() = {"a"C, "b"C, "c"C, "d"C, "e"C, "f"C, _
"g"C, "h"C, "i"C, "j"C, "k"C, "l"C, _
"m"C, "n"C, "o"C, "p"C, "q"C, "r"C, _
"s"C, "t"C, "u"C, "v"C, "w"C, "x"C, _
"y"C, "z"C, "A"C, "B"C, "C"C, "D"C, _
"E"C, "F"C, "G"C, "H"C, "I"C, "J"C, _
"K"C, "L"C, "M"C, "N"C, "O"C, "P"C, _
"Q"C, "R"C, "S"C, "T"C, "U"C, "V"C, _
"W"C, "X"C, "Y"C, "Z"C, "0"C, "1"C, _
"2"C, "3"C, "4"C, "5"C, "6"C, "7"C, _
"8"C, "9"C, "-"C, "_"C}
Dim _Crypted AsString = "#1"
Dim i AsInteger = 0
While i < Password.Length
Dim PPass AsChar = Password(i)
Dim PKey AsChar = Key(i)
Dim APass AsInteger = DirectCast(PPass, Integer) / 16
Dim AKey AsInteger = DirectCast(PPass, Integer) Mod 16
Dim ANB AsInteger = (APass + DirectCast(PKey, Integer)) Mod HASH.Length
Dim ANB2 AsInteger = (AKey + DirectCast(PKey, Integer)) Mod HASH.Length
_Crypted += HASH(ANB)
_Crypted += HASH(ANB2)
System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1)
EndWhile
Return _Crypted
EndFunction
En vous remercients :)