Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is there a function to encrypt/decrypt password text?

843811Aug 24 2001 — edited Oct 1 2001
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 "rhb32n9@" 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
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
Just one more question, Is the sarcasm included in this package you've mentioned?

Thanks,

;)
843811
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
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
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.
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 29 2001
Added on Aug 24 2001
5 comments
120 views