The Daily Click ::. Forums ::. Klik Coding Help ::. Anyone use the blowfish object?

Post Reply  Post Oekaki 

Posted By Message

Del Duio

Born in a Bowling Alley


GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
8th January, 2006 at 13:25:11 -

I tried to use this the other day, and it sort of worked, but my .ini file ended up looking like a long line of encrypted information followed by a list of un-encrypted information.

Do you have to totally clear the .ini before writing anything new to it using the "encrypt file" function on blowfish? If so, how do you do that? Before without encryption, I didn't have to, but now application seems to encounter errors somehow now and crashes often.

I know this probably isn't very consise, but here's the general idea for what I'm trying to do:

On the application's start, the .ini file is decrypted.
All information passed to and from the .ini during normal gameplay is regular and not encrypted.
(This includes being able to save / load at will in-game)
On a regular <quit>, the file is encrypted again and the app ends.
On a quick <quit>, the file is also encrypted again and the app ends.

To me, this should work fine but it doesn't for some reason. Sometimes It wouldn't encrypt the .ini at all, it'd just be the normal list of information as if blowfish didn't exist. I have a blowfish object in each frame that uses either encrypt or decrypt, and made sure to set the key to the same exact values. Anyone else use blowfish normally and could help me out?

Thank you!


"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!


Possibly Insane


8th January, 2006 at 18:04:54 -

I once had my fun with the same problem. For me it worked with Blowfish. For others the complete encrypt/decrypt stuff refused to work. Same fun as you describe here. And so i cancelled it completely then. I used an normal array instead. Without encryption ...

There were nevertheless some suggestions that came up. Havenīt tested it though. I was simply too lazy to dive deeper into it:

- Donīt use encryption/decryption at start of frame. Use an extra group for that. The author who told me this had no explanation for it. But he was able to avoid such trouble by this.

- Try to code everything in one event if even possible. Decryption, load, save, encryption. It seems that there is some timing issue involved. And so it can happen that the next line is performed before blowfish has finished its encryption/decryption. Which would explain why sometimes stuff is written unencrpyted to file.

I hope one of those points will fix your problem.

Free graphics,Free Games


God's God


Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
8th January, 2006 at 18:18:45 -

Only real problem I found with it is, it cant tell if an object is decrypted or encrypted, so you cant make the event "if object isnt encrypted" or something like that, making it really hard to make sure files are encrypted after the game is shut down (because end of game events dont run if you exit the game wrong; alt+ctrl+del...)

Long John Kickbag

8th January, 2006 at 19:58:25 -

Sure you can, just put a certain byte combination at the start, if the first n bytes of the file match the byte combination then it's not encrypted, otherwise it is encrypted.

Resize! -

Post Reply



Worth A Click