This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Encryption  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Is there any API for Encryption of Data. I mean to say I want to store the password in the database in an encrypted form and while retrival it will be decrypted .Can anyone help me
-Thanks
Sibasish
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sibasish,

to compare a given String with a password stored in a data base,
you normally don't have to decrypt the password every time anew.
Instead you put the hash value of the password into the data base.
Now, every time someone want's to log in, using the password, you
create the hash value of the entered (plain text) password and
compare it to the hash value in the database. The two hash values
will be equal if the password entered by the user is equal to the
password which was originally hashed and put into the database.

I hope I made myself clear.
Sometimes I fail because of my dilettantish english

However - Hope that helps.
Regards,
- Thomas -
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are some classes in the library and many on the internet. Look around in the java.security and javax.crypto packages. Sorry to say I have no hands-on with any of this, but here's Another Ranch Thread that may help.
[ May 02, 2005: Message edited by: Stan James ]
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!