Secret Message - Turing

Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Locked
jakskal
Posts: 17
Joined: Mon Oct 24, 2005 7:30 pm

Secret Message - Turing

Post by jakskal »

I've to write a program that will allow the user to write a message in English and save it to a file in a coded format. I need it so the user also has the option to open a coded file and have it displayed on the screen.

The user has to write at least 10 lines of text for the message. For instance, the user can type XXX or something similar to end their message. The program should take each line of input, encode it and store it in a file. The process stops and the fil is closed when the user tpyes in XXX.

The user has to supply the coded file name to read and the program will open the file, read in one line at a time, translate the line, display the English version on the screen, and continue until the file is completely read.
It can't be done using straight substitution method (Eg. a becomes t, b becomes x, etc.) it would be easy to break the code this way. I have to come up with other methods or a combinaion of methods to code and decode the message so they cannot be easily decoded.

Here are the methods to consider:
- substitute a single character for a whole word: the become &
- substitute a single character for common 2/3 letter combinations: th - 2, tr - 3, ing - 4 etc.
- use a "key" to decode each message, the key would be known to the user and can change each time a message is sent.

I got some of it done, but its at school. I'll post the source code tomorrow. Until then suggestions would be appreciated.

Archived topic from Iceteks, old topic ID:3886, old post ID:31725
Pyr-O-Rgasm
Posts: 954
Joined: Mon Jan 17, 2005 5:16 pm

Secret Message - Turing

Post by Pyr-O-Rgasm »

.... And a week later....

Archived topic from Iceteks, old topic ID:3886, old post ID:31979
Pyr-O-Rgasm
Posts: 954
Joined: Mon Jan 17, 2005 5:16 pm

Secret Message - Turing

Post by Pyr-O-Rgasm »

... Two weeks later....

Archived topic from Iceteks, old topic ID:3886, old post ID:32133
Locked