Encripting your program/file

Started by
4 comments, last by XDarkScar 20 years, 11 months ago
how do you do that? encripting your program from a hex editor? encripting a file that your program makes? an example of how it is done? Easy way of programming: Code, Graphics, Swearing....
Easy way of programming: Coding, Debugging, Swearing.
Google / Game Tutorials / GameDev.Net / My Project server. Check it out.
Project: N/A / Percent Complete: 0% / Due Date: N/A
Advertisement
What sort of encryption are you talking about? what are you actually trying to **do**?

How appropriate. You fight like a cow.
encription were the "computer user" can not under stand and encription were the program can''t be read and edited from a hex file

Easy way of programming: Code, Graphics, Swearing....
Easy way of programming: Coding, Debugging, Swearing.
Google / Game Tutorials / GameDev.Net / My Project server. Check it out.
Project: N/A / Percent Complete: 0% / Due Date: N/A
Okay, I'll restate my question.

Encryption keeps people from doing certain things; e.g. reading your documents, getting the code to the Vault Of Secrecy, pretending they're the president and ordering a nuclear strike on Canada. What do you NOT want people to do? (And don't say "edit something with a text editor". Logically, anything, including encrypted data, can be edited with a text editor.)

EDIT: oh, and for that matter... what do you want them to still be able to do?

How appropriate. You fight like a cow.

[edited by - sneftel on April 30, 2003 1:18:45 AM]
I''m not sure how to implement it, but you can do some pretty nice encryption with a cipher and some sort of AND Bit comparison between the data and the cipher. It depends on how secure it needs to be, probably?
Peon
An easy, but un-secure way to encrypt is to XOR the binary with another binary string. So, if you encrypt "101101" with "101010" you will get "000111". Then all you have to do is XOR it with "101010" again to get "101101". To prevent users from editing, you can also save the file size of your save file in a separate file, and then encrypt that file too. If the file size as stated in that file and the actual filesize doesn''t match, you know it has been changed.

---------------------------------------------
How many nukes could a fat duck duck if a fat duck could duck nukes?
Abnormally large and solar energy charged!

This topic is closed to new replies.

Advertisement