Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 encryption help no ord
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Shyfire




PostPosted: Fri Aug 05, 2005 12:32 pm   Post subject: encryption help no ord

first of all hi
i need a good encryption programe to incorperate into my game

so could some one show some source code on how to make a good encryption programme with out using ord

thx
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Fri Aug 05, 2005 3:43 pm   Post subject: (No subject)

Making a 'good' encryption program isn't for Turing.
You can make a decent encryption (for the average user) without (don't know why you don't want to) ord just by shuffling the letters using something like 'index'. Then when the program reads the file it unshuffles the letters in a certain way.

You may want to check some other simple encryption methods on google, I am sure there are quite a few.
Delos




PostPosted: Fri Aug 05, 2005 6:17 pm   Post subject: (No subject)

Why not be a little inventive if you don't want to use 'ord' then? Think about this...for each character that exists in a file, do you need exactly one other letter to represent it (or vice versa)?
[Gandalf]




PostPosted: Fri Aug 05, 2005 6:39 pm   Post subject: (No subject)

Ah, I see. Why not go for compression as well Wink. It would work really well, especially if it's just text files that you is doing it for.

Hint: There are only 26 (x2 if you are using cases) letters in the alphabet, and 9 numbers, thats all the data you need for a file. The rest is just what position in the file the character is.
md




PostPosted: Fri Aug 05, 2005 9:49 pm   Post subject: (No subject)

there are 10 munbers... unless you are using O (as in "Oh") for 0 (zero)... but I doubt that that would help much anyways. The real question is why you're trying to encript the file, and why if you feel you need to you haven't written your own ord function?
[Gandalf]




PostPosted: Fri Aug 05, 2005 10:13 pm   Post subject: (No subject)

Dang! I knew there was a mistake there somewhere Laughing.

For more help on this kind of thing check out the "String Manipulation Tutorial".
MysticVegeta




PostPosted: Mon Aug 08, 2005 8:24 am   Post subject: (No subject)

heh, once a long time ago, i came across a DWITE Problem, something called "Cipher 2000" or was it in ECOO? I dont know. But i solved it and i quite liked the encrption so i use that type of encryption in most of my games/programs when i save some usefull data to a text file.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: