0/5 (13 avis)
Vue 13 072 fois - Téléchargée 1 639 fois
Option Explicit Dim TextMD5 As MD5 'Variable pour le cryptage Dim Chemin As String 'String du Chemin Dim Org As Boolean 'Renvoie True si on a mit un hash a comparer Private Sub Form_Load() Call Reset_Click 'Efface tout pour etre sur Set TextMD5 = New MD5 'Initialise la classe End Sub Private Sub Check_Click() 'Regarde si on doit comparer les 2 MD5 If txtOrg.Text <> "" Then Org = True 'Hash a comparer Else Org = False 'Pas de hash a comparer End If If FileExist(Chemin) Then 'Appelle les fonctions pour calculer le MD5 txtResult.Text = MD5File(Chemin) txtString.Text = MD5String(Chemin) If Org = True Then Call Compare 'Compare les 2 Hashs End If Else 'Boum ! Chemin invalide ... txtChemin.Text = "Chemin invalide !" End If End Sub Private Sub Crypt_Click() If txtTexteClair.Text = "" Then Exit Sub 'Teste les champs 'Crypte le texte txtTexteCrypte.Text = LCase(TextMD5.DigestStrToHexStr(txtTexteClair.Text)) End Sub Private Sub Parcourir_Click() 'Procedure pour recuperer le chemin du fichier Fichier.ShowOpen 'Ouvre la boite Chemin = Fichier.FileName 'Recupere le chemin txtChemin.Text = Chemin 'Affiche le chemin End Sub Private Sub PP_Click() Clipboard.Clear 'Vide le presse-papier Clipboard.SetText (txtResult.Text) 'Copie dans le presse-papier End Sub Private Sub PP2_Click() Clipboard.Clear 'Vide le presse-papier Clipboard.SetText (txtTexteCrypte.Text) 'Copie dans le presse-papier End Sub Private Sub Reset_Click() 'Fait le ménage txtResult.Text = "" txtString.Text = "" txtChemin.Text = "" txtOrg.Text = "" Chemin = "" Org = False End Sub Private Sub Reset2_Click() 'Fait le ménage txtTexteClair.Text = "" txtTexteCrypte.Text = "" End Sub Private Sub End_Click() End 'Quitte End Sub
6 août 2007 à 16:21
28 déc. 2006 à 13:55
28 déc. 2006 à 13:54
28 déc. 2006 à 12:46
dsl...
28 déc. 2006 à 12:43
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.