SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast Nawaz Ijaz's Avatar
    Join Date
    Feb 2005
    Location
    Lahore, Pakistan
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to Decrypt Password, Encrypted by MDI ?

    with your kind support and using this code,

    'Encrypt the password
    Dim md5Hasher as New MD5CryptoServiceProvider()

    Dim hashedBytes as Byte()
    Dim encoder as New UTF8Encoding()

    hashedBytes = md5Hasher.ComputeHash(encoder.GetBytes(txtPwd.Text))

    Dim paramPwd as SqlParameter
    paramPwd = New SqlParameter("@Password", SqlDbType.Binary, 16)
    paramPwd.Value = hashedBytes
    objCmd.Parameters.Add(paramPwd)
    I have been able to Encrypt my password, but now I am struggling to Decrypt it and i need your suggestions again.
    Now how i can Decrypt the password that is stored in my DB as binary form.

    Thanx in Advance.
    Nawaz Ijaz [Lahore, Pakistan]
    Boy: He is big..i wont like to fight him...
    Achilles: Thatz Y no one wud remember u after thousand years...!!

  2. #2
    SitePoint Enthusiast Nawaz Ijaz's Avatar
    Join Date
    Feb 2005
    Location
    Lahore, Pakistan
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Say I have Encrypted Password in variable "hashedBytes" as in binary 16-digit format. I need to get it back in original form. How to Decrypt it.
    Nawaz Ijaz [Lahore, Pakistan]
    Boy: He is big..i wont like to fight him...
    Achilles: Thatz Y no one wud remember u after thousand years...!!

  3. #3
    SitePoint Addict
    Join Date
    Feb 2004
    Location
    Staffordshire, UK & Florida, USA
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It appears that you are using MD5 encryption. If so, the short answer is that you can't decrypt the hashed data as MD5 is a one-way 'hashing' encryption.

    You can only use it for comparison e.g. of usernames/passwords, etc. because the same input will always produce the same output.

    Sorry!

  4. #4
    SitePoint Zealot Imran-Saami's Avatar
    Join Date
    Sep 2004
    Location
    Pakistan-Dubai
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sorry

  5. #5
    SitePoint Enthusiast Nawaz Ijaz's Avatar
    Join Date
    Feb 2005
    Location
    Lahore, Pakistan
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please Don't do this with me guys. I really need to decrypt the password as its my clients requirement. If MD5 doesn't allow to decrypt the passsword, please tell me some other method (your own will be appriciated ) which both Encrypt and decrypt the password.

    I am trying many different things but I havn't done it yet. I need it ....
    Nawaz Ijaz [Lahore, Pakistan]
    Boy: He is big..i wont like to fight him...
    Achilles: Thatz Y no one wud remember u after thousand years...!!

  6. #6
    SitePoint Addict
    Join Date
    Feb 2004
    Location
    Staffordshire, UK & Florida, USA
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  7. #7
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,294
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Why do they need to decrypt passwords? That's a BIG violation of personal security and I know I wouldn't use their site if I knew they were doing that.

    All you need to provide is a method for resetting lost passwords. Something like sending the user a new password to their email account upon clicking on a specific link.
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style
    Learn how to be ready for The Forums' Move to Discourse

  8. #8
    SitePoint Enthusiast Nawaz Ijaz's Avatar
    Join Date
    Feb 2005
    Location
    Lahore, Pakistan
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx God. I did it.

    DaveMaxwell, You are very right but what i can do if my boss want me to do that. Actually it was the client's requirement. He want to resend the forgotten passwords. So I had to do this.

    Here is the code that helped me and i be able to accomplish this job. Thanx to writer of this code and thanx to google.

    Nawaz Ijaz [Lahore, Pakistan]
    Boy: He is big..i wont like to fight him...
    Achilles: Thatz Y no one wud remember u after thousand years...!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •