• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

encrypt, decrypt password

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I have to decrypt the password which is stored in Open Edge Database. That password is already encrypted by using ENCODE function of progress database.

Now , I have to decrypt the password by using java. can you any one help me to do this?

i did not find out which algorithm they are using to make encryption.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

adi reddy wrote:I have to decrypt the password which is stored in Open Edge Database. That password is already encrypted by using ENCODE function of progress database.


You can't. If you look at the documentation, ENCODE is a one-way only process. You use it to compare an encoded password with an encoded entered string, but there is no DECODE function.

So either the person who asked you to do this is pulling your leg, or they don't understand how ENCODE works.

Winston
 
lowercase baba
Posts: 13082
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
step back and think about what is being asked.

Passwords are used to control who has access to what. If you could decode a password, so could a hacker. If they could get a copy of your database, they could then decode every single user's password, and get free reign to the system.

Does that sound like something you want to happen?

Password encodings are DESIGNED to be one-way. I enter a password, the system runs it through a one-way algorithm, and computes some new value. The other thing about these is that it is EXTREMELY hard to predict the outcome. Similar inputs will give wildly different outputs. So a password of "fred" may result in a value of "jhbp;wienv", and a password of "Fred" may result in "azvda098f".

So...it is not supposed to be possible to 'undo' the encoding.

Who gave you these requirements?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How it usually works is like this (a bit simplified):

  • Somebody creates a new account and comes up with a password.
  • A new row is created in the 'users' table, containing the name of the user and the encoded password.

  • When the person wants to log in, this is what happens:

  • The user fills in his or her username and password on the website.
  • The application checks if there is a row in the 'users' table with the username that was entered.
  • The application checks if the password is correct by encoding the password that the user entered, and comparing that encoded password to the encoded password in the database. If they are the same, the entered password is correct.

  • Note that in this process, it is nowhere necessary to decode the password stored in the database - only an encoding function is necessary.

    As others have explained, the ENCODE function was designed not to be reversible - that's exactly why it's secure.
     
    Watchya got in that poodle gun? Anything for me? Or this tiny ad?
    the value of filler advertising in 2021
    https://coderanch.com/t/730886/filler-advertising
    reply
      Bookmark Topic Watch Topic
    • New Topic