Secure internet communications

Mar 22, 2015
Reaction score
I have been thinking of writing some code that takes a text message and replaces each word with a page number, line number and the word count number in the line.

It is much like a book cypher but instead of a published book I have a comma delineated list of just over 600000 words names and symbols. The text would be entered into the program that would search for the word and output the words location as three numbers for each word. since my list has never been published, is not in alphabetic order, I think it would work as long as the software and word list can be given to "friends" through the mail and not transmitted over the internet.

I think I will need some code to accept a line of text (or several lines of text) and then parse the lines into separate words. It will then open the word list (also in text) and search for the first word. When it finds that word it has to use variables to store the page number, line number and the word count in that line. The three numbers will be put into file that is appended until all the words are found. The variables will be reset to zero after each search and the list closed and reopened for each search.

If numbers are input it uses the numbers to find the page, line and word count to replace the numbers with the words to make the coded message readable.

I may have to separate the encoding into one function and the decoding into another function. That way we can use numbers (the numerals 0-9 are in the list) for addresses and phone or fax numbers or just trading math for whatever reason.

I am wondering if I am going to get in over my head in this project. I have only been writing in C99 for just less than a year. (I am 64 and this is hard for me but I do enjoy the challenge.

I obviously have to place page numbers at the top of each page and track line numbers and keep track of the number of words I have read in the line. It seems doable but I am going to need to learn about reading each word from the file, compare it to the word I want to encode and then save the results to a text file.

I haven't begun to write code yet but I am wondering if I have thought this out properly.

Any input would be welcomed.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question