IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VB.NET Discussion :

Aide avec mon programme decryptage MD5


Sujet :

VB.NET

  1. #1
    Nouveau Candidat au Club
    Profil pro
    Inscrit en
    Avril 2013
    Messages
    267
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2013
    Messages : 267
    Points : 0
    Points
    0
    Par défaut Aide avec mon programme decryptage MD5
    bonjour, voila j'ai un petit problème avec mon programme quand je lance il m'affiche aucun résulta. pouvez-vous m'aider a résoudre ce problème.
    voici en image:
    http://imageshack.us/a/img90/9764/de...emd5erreur.jpg
    mes codes:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    Public Class Form1
     
        Private ObjCmd5 As New Cmd5
     
        Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
     
        End Sub
     
        Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
            TextBox1.Paste()
            Button1.Enabled = True
        End Sub
     
        Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
            Dim text As String = TextBox1.Text
            Dim alphabet As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&'()*+,-./:;<=>?@[\]^_'{|}~"
            Dim stopwatch As New Stopwatch
            Dim max As Integer = 1
            stopwatch.Start()
            TextBox2.Text = ("" & 1)
            If ObjCmd5.CassMd5("", 1, alphabet, [text]) Then
                Do
                    max += 1
                    stopwatch.Start()
                    TextBox2.Text = ("" & max)
                Loop While ObjCmd5.CassMd5("", max, alphabet, [text])
            End If
            TextBox3.Text = ObjCmd5.RetourChaine
            stopwatch.Stop()
            Dim elapsedMilliseconds As Integer = CInt(stopwatch.ElapsedMilliseconds)
            MessageBox.Show(("Trouvé en : " & CStr((elapsedMilliseconds * 0.001)) & " sec"))
        End Sub
     
        Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
            TextBox1.Clear()
            TextBox2.Clear()
            TextBox3.Clear()
            Button1.Enabled = False
        End Sub
     
        Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
            Application.Exit()
        End Sub
     
        Private Sub LANCEMENTLOGICIELMD5ToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles LANCEMENTLOGICIELMD5ToolStripMenuItem.Click
            Form2.Show()
        End Sub
    End Class
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    Imports System.Runtime.InteropServices
    Imports System.Text
    Imports System.Security.Cryptography
     
    Class Cmd5
     
        Public Function CalcMd5(ByVal sChaine As String) As String
            Dim bytes As Byte() = New ASCIIEncoding().GetBytes(sChaine)
            Dim buffer As Byte() = New MD5CryptoServiceProvider().ComputeHash(bytes)
            Dim builder As New StringBuilder(buffer.Length)
            Dim index As Integer = 0
            If (0 < buffer.Length) Then
                Do
                    builder.Append(buffer(index).ToString("X2"))
                    index += 1
                Loop While (index < buffer.Length)
            End If
            Return builder.ToString
        End Function
     
        Public Function CassMd5(ByVal chaine As String, ByVal max As Integer, ByVal alphabet As String, ByVal CrypterPass As String) As <MarshalAs(UnmanagedType.U1)> Boolean
            If (chaine.Length = max) Then
                If (CalcMd5(chaine) = CrypterPass) Then
                    RetourChaine = chaine
                    Return True
                End If
                Return False
            End If
            Dim num As Integer = 0
            Do
                If CassMd5((chaine & alphabet.Chars(num)), max, alphabet, CrypterPass) Then
                    Return True
                End If
                num += 1
            Loop While (num < &H24)
            Return False
        End Function
        Public RetourChaine As String
    End Class
    voici mon projet dans pièces jointe.

    Merci,cordialement
    Fichiers attachés Fichiers attachés

Discussions similaires

  1. Debutant, aide avec mon main
    Par nikwik666 dans le forum Langage
    Réponses: 2
    Dernier message: 27/10/2007, 16h25
  2. besoin d'aide pour mon programme
    Par pouyoudu17 dans le forum Débuter avec Java
    Réponses: 11
    Dernier message: 28/05/2007, 22h18
  3. envoyer un mail avec mon programme
    Par shrek dans le forum C++Builder
    Réponses: 8
    Dernier message: 06/12/2006, 12h27
  4. Réponses: 9
    Dernier message: 10/08/2006, 17h33
  5. [TP] Problème avec mon programme de conversion
    Par Panzer95 dans le forum Turbo Pascal
    Réponses: 5
    Dernier message: 28/05/2006, 18h36

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo