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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

String Encryption

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

I am using Solaris 10g R2
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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