Décryptage
dampenfr31
Messages postés
281
Statut
Membre
-
dampenfr31 Messages postés 281 Statut Membre -
dampenfr31 Messages postés 281 Statut Membre -
Bonjour,
comment je pourrais modifier ces code pour décrypter et non crypter ???
Private Function Crypt(ByVal text As String)
Dim returnText As String = ""
For i As Integer = 0 To text.Length - 1
returnText &= hash(Asc(text(i)) Mod hash.Length)
Next
Return returnText
End Function
Private Function Crypt2Nd(ByVal text As String)
Dim returnText As String = ""
For i As Integer = 0 To text.Length - 1
returnText &= hash2Nd(Asc(text(i)) Mod hash2Nd.Length)
Next
Return returnText.ToUpper
End Function
J'ai tout essayé je n'y arrive pas
merci d'avance
comment je pourrais modifier ces code pour décrypter et non crypter ???
Private Function Crypt(ByVal text As String)
Dim returnText As String = ""
For i As Integer = 0 To text.Length - 1
returnText &= hash(Asc(text(i)) Mod hash.Length)
Next
Return returnText
End Function
Private Function Crypt2Nd(ByVal text As String)
Dim returnText As String = ""
For i As Integer = 0 To text.Length - 1
returnText &= hash2Nd(Asc(text(i)) Mod hash2Nd.Length)
Next
Return returnText.ToUpper
End Function
J'ai tout essayé je n'y arrive pas
merci d'avance
4 réponses
Bonjour,
D'après le code, c'est la fonction hash() qui chiffre. C'est donc ça que tu dois modifier pour déchiffrer.
Cdt.
D'après le code, c'est la fonction hash() qui chiffre. C'est donc ça que tu dois modifier pour déchiffrer.
Cdt.
j'ai utilisé :
Dim hash() As String = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}
Dim hash2Nd() As String = {"F", "E", "D", "C", "B", "A", "9", "8", "7", "6", "5", "4", "3", "2", "1", "0"}
Dim hash() As String = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}
Dim hash2Nd() As String = {"F", "E", "D", "C", "B", "A", "9", "8", "7", "6", "5", "4", "3", "2", "1", "0"}
Parce que certain hash (genre un md5) ne permette pas de retrouver le texte d'origine.
Enfin, pas simplement, quoi.