Security Software review and downloads
  • Home
  • Spyware & Spyware Remover
  • Registry & Registry Cleaner
  • Firewall
  • Hacked
  • Uninstall & Uninstaller
  • Antivirus

Simple Java String Encryption?

April 14th, 2008 · 2 Comments

So I recently made a fun little game of blackjack using java and swing and all that. I have the option to save the game data (user's name and bankroll), which simply writes the two into a text file in a specified folder. This then allows me to pull the two out of the text file, whenever the user wishes to open a saved game.

Now the problem with this, is that you can easily go into the text file and change everything (including how much money you have). This way, the next time the player loads the game, he has whatever amount of money he wrote in. I'd like to get rid of this problem in some way.

I was thinking about jumbling the words and numbers in the string around. But I know that it can't really be random, cause then I wouldn't be able to unjumble them later on when reading the text file to open a saved game.

So I'm looking fro some ideas, be it pseudocode or full code, on a way that I can save the game onto a text file in a way that I can then unjumble (unencrypt) later on

Related posts:

  • text encryption?
  • can any one recommend me a text encryption software that would enable me to convert large...
  • Do you think this is a good program? I made - encryption program.?
  • There are NO viruses. Save the program so you can acually use it. It will start,...
  • mass file un-encryption?
  • Is there a DOS level utility to unencrypt a folder and all its subfolders and files? I...
  • In need of an encryption algorithm?
  • I need to encrypt a piece of text in JavaScript to be passed as a URL parameter and...
  • php encryption?
  • Hello all, I am designing a website and need to encrypt some data. I know how to encrypt...
  • question for mac users…i saved pdf from the web and i'm trying to fill out the form however?
  • when i save the file, the text won't save. the only thing that will save is my phone...
  • Do you think this is a good program? I made - encryption program.?
  • There are NO viruses. Save the program so you can acually use it. It will start,...
  • How to edit a dll file?
  • Ok, I can open the .dll (ex. dnsapi.dll) but I cannot see the string. What does this...
  • I am working on an C++ encryption program and I can use some help?
  • Develop a program that performs simple cryptography. The program will allow the user to...
  • What is “binary encryption”?
  • Recently I saw a question about "binary encryption". They were asking people to decode a...

    Tags: Encryption


    2 responses so far ↓

    • 1 mapaghimagsik // Apr 14, 2008

      True encryption can be a pain, since the key is stored somewhere. The question to ask yourself is how difficult do you want it to be to hack the game?

      For something as simple as a game, you might just 64bit encode the file. Its very hackable, but this is just a blackjack game :)

      For real encryption, java has powerful functions which allow for the generations of keys, and encryption of data

    • 2 blessed_thang // Apr 14, 2008

      Save it as a byte stream instead of a text file.

      Most people don't now what an 8-byte character is should they manage to even look at the data on screen.

      It's pretty much up to you, the programmer, how the data is stored and then retrieved to human readable form.

      You can think of the 8-byte as a char. You could token your data's line into words, add a special char for psuedo lines and another special char for psuedo white space.

      Then you write the data to file as a single column of words using [word+psuedoSpace+'\r'] and the last word of the original line gets psuedoReturn.

      To make your program platform neutral you use:
      String lineRET = System.getProperty( "line.separator")
      // that way, if the file comes from Linux, Mac or Window, the proper character is inserted or read correctly.

      The Crytography API is illegal to use outside the territorial boundaries of the United States. I don't know why, but that is the case. There are many games online, including PigLatin that are okay to use for all programming situations.

      So, you would have to know all this anyway, before you consider scrambling. And, there's nothing hard about it. It's just humans are more comfortable writing / reading text files.

    Leave a Comment

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word

    Tags: Email Spam Uninstall spyware Security Software Trend Micro Registry Cleaner Pc Tools Norton Nod32 Kaspersky Internet Security Hacked Firewall Computer Security Avg Avast Antivirus Ad Aware Monitoring Software Encryption Backup


    A Slow System?
    Harassed by DLL errors?
    Plagued by constant Blue Screens?
    Receiving error messages and don't know why?

     
    • Most popular Software downloads

      • Pctools
      • kaspersky
    About | Contact Us | Old Sitemap Security Software review and download . All rights reserved PoweredBy Yahoo!API.