Sunday, July 12, 2009

How to encrypt a message thats been entered using strings in C language?

Easiest thing to do would be to use the following letter for each letter in the message. So you would translate "Hello" to "Ifmmp". So your algorithm would look something like this:





char outbuf = new char[sizeof(in)]





int i;


for (i = 0; i%26lt;sizeof(in); ++i)


outbuf[i] = in[i] + 1;





You will also havr to deal with the case of translating 'Z' to 'A', and terminating your string. Have fun!

How to encrypt a message thats been entered using strings in C language?
quickly.


No comments:

Post a Comment