aspose file tools*
The moose likes Linux / UNIX and the fly likes String Encryption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply locked New topic
Author

String Encryption

sumit mathur
Ranch Hand

Joined: Sep 01, 2009
Posts: 34
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

Joined: Sep 01, 2009
Posts: 34

I am using Solaris 10g R2
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42931
    
  68
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

Joined: Sep 01, 2009
Posts: 34
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
Marshal

Joined: Mar 22, 2005
Posts: 42931
    
  68
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String Encryption