This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Crypted Strings in a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Crypted Strings in a file" Watch "Crypted Strings in a file" New topic
Author

Crypted Strings in a file

Philip Pross
Ranch Hand

Joined: Jan 17, 2001
Posts: 76
I would like to be able to crypt certain words of a file. For example here is my file
java~c++~java~java~java~java
java~c++~java~java~java~java
java~c++~java~java~java~java
java~c++~java~java~java~java
java~c++~java~java~java~java
all I want to crypt is "c++" .... and the rest of the file stays the same
Is there a possiblilly to to this .......
Chris Shepherd
Ranch Hand

Joined: Jun 27, 2000
Posts: 286
hmm, going to need more info than this I think. Is it a text file? Is it a file you write or just read? Do you need to encrypt it or just make it non human legible? Is it always going to be the same thing (like c++ on every line)or is it something different for each line?
Need some more info/answers/explanations before we can take a shot at helping you with this.
sandy gupta
Ranch Hand

Joined: Jan 30, 2001
Posts: 228
Parse the String, Tokenize it on c++, encrypt the tokens(using one of the encryption algorithms, i would suggest using the LZW) and reset the tokens in their original places.
Thats it, you are done.


Adios
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Crypted Strings in a file
 
Similar Threads
Filter question
FTP upload with Commons.net got exception
Unix Authentication by using servlet
Call exe file with parameters in JAVA
simple javascript form