• Post Reply Bookmark Topic Watch Topic
  • New Topic

Enycrypting and serialisation

 
Colin McTaggart
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I was just told about serialization for the the first time in another thread. It's fantastic compared to the old system I used which was tab delineated plain text files.

My question is regarding protecting the data stored in the file I generated using serialization. The object I saved was an array-list containing instances of a container class I made that consists entirely of string and Boolean values.

When I open the file in a plain text editor I can see the values of the variables but not their names. i was wondering if it were possible to obfuscate or encrypt the file in such a way as to make it look like junk data to a plain text editor.

I know it's near impossible to make the data completely safe, I would just feel better if it were at least difficult to access

Any advice from you JAVA gurus would be muchly appreciated
 
Stephan van Hulst
Bartender
Posts: 6583
84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, ObjectOutputStream requires an output stream to wrap around. You can provide a stream that encrypts the data. If you're only interested in simple obfuscation, this can be as simple as a Caesar cipher.

Why are you worried about this?

[edit]

I see the question has already been asked and answered here: http://www.coderanch.com/t/529120/Streams/java/Saving-lots-data-file
 
Colin McTaggart
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I thought my previous topic was dead and hadn't seen that final post, thanks for the help. The reason I want to protect the data is my app is going to be released as a part of a business I'm trying to start up ad I dont want competitors being able to copy my database too easily. I figured competitors with lots of resources will get into it no matter what I do and anyone else should hopefully be deterred by it being easier to make their own than copy mine I'll mark this topic as solved.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!