Forum Stats

  • 3,826,852 Users
  • 2,260,713 Discussions
  • 7,897,101 Comments

Discussions

Is there a function to encrypt/decrypt password text?

843811
843811 Member Posts: 49,851
Hi !

I'm new to the java.security.*, so I need your help finding a class/function in the Java API useful to encrypt/decrypt some text.

For example:
Username: myTest
Password: myPassword

In this case, "myPassword" is the string used by the user, but the database engine should never use the same password of the application.
So I need a function that I can give the "myPassword" string and return some random encrypted text like "[email protected]" which I will use to set the user password for database. Of course, the decrypting process will be useful.

Any help will be appreciated,

Rodolfo

Comments

  • 843811
    843811 Member Posts: 49,851
    I'm new to the java.security.*,
    I would say you are new to this site, as you have not yet discovered that you can easily find the answer by using http://search.java.sun.com which will get you to http://developer.java.sun.com/developer/qow/archive/28
    Of course, the decrypting process will be useful.
    No, one should rarely need to decrypt passwords. Instead, store the encrypted password. Then, when at a later time the user enters username and password, encrypt the given password and compare the two encrypted values.

    a.
  • 843811
    843811 Member Posts: 49,851
    Just one more question, Is the sarcasm included in this package you've mentioned?

    Thanks,

    ;)
  • 843811
    843811 Member Posts: 49,851
    Jeez - if you're not going to help a poster, don't post. What a freaking idiot.
    - and decryption codes are useful for a great many reasons, and if you had any idea about this topic, you'd have known that - authentification isn't the only reason for ecrypting passwords.

    As to answers - I have none yet - and yes, I used the search engine and I havn't found a simple and convienient answer yet. If I do find one, I'll post back here.
  • 843811
    843811 Member Posts: 49,851
    Jeez - if you're not going to help a poster, don't post. What a freaking idiot.
    - and decryption codes are useful for a great many reasons, and if you had any idea about this topic, you'd have known that - authentification isn't the only reason for ecrypting passwords.

    As to answers - I have none yet - and yes, I used the search engine and I havn't found a simple and convienient answer yet. If I do find one, I'll post back here.
  • 843811
    843811 Member Posts: 49,851
    Jeez - if you're not going to help a poster, don't post. What a freaking idiot.
    - and decryption codes are useful for a great many reasons, and if you had any idea about this topic, you'd have known that - authentification isn't the only reason for ecrypting passwords.

    As to answers - I have none yet - and yes, I used the search engine and I havn't found a simple and convienient answer yet. If I do find one, I'll post back here.
This discussion has been closed.