This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
    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
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

String Encryption  RSS feed

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi

I have text file where i am storing user name and password as input from user. And later in my application i am using these user name and password .


I want encrypt the password after taking input. And then decrypt it at the time using it.

How should i go for it???

My application goes like this..

step 1) Read input (GUI operation using Macrovision Install Anywhere )

step 2) Store it in text file.

step 3) Run a script that will encrypt the password

step 4) At the time using password. Decrypt the file to a new file with clear text password , Read the password and Delete this decrypted file.


Is there any way to do this?? My main objective is to avoid clear text password in a text file.
 
sumit mathur
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Report post to moderator

I am using Solaris 10g R2
 
Rancher
Posts: 42974
76
  • Mark post as helpful
  • send pies
  • Report post to moderator
The standard API for encryption in Java is called JCE; the http://faq.javaranch.com/java/SecurityFaq#encryption contains a fair amount of information about it.

Why do you want to run a script as step 3? Can't you do that from within the application?

You'll need to think about where to store the encryption key (unless you want to hardcode that into the application code).
 
sumit mathur
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hey Ulf Dittmer


The way you are telling , in that case i may need to wriite a java code to encrypt and decrypt .

I prefer to use in built utility with Sloaris . Is there suggestion regarding this???
 
Ulf Dittmer
Rancher
Posts: 42974
76
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!