954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Encrypt a "string"

If I have this string:

"Hello"

How would I do to encrypt this string ?

Liszt
Junior Poster
122 posts since Oct 2008
Reputation Points: 33
Solved Threads: 6
 

Loop though the characters and do whatever you feel is adequate. Not much to beginners level "encryption." So go write it!

I assume you used a search engine? Other wise look up "cipher," and "c++ encryption."

MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116
 

Thank you...
Yes I did search for "encryption C++" etc.. but only very complex example were shown.

So that is the idéa of encrypt. So "Hello" encrypted as a very simple example could look like this:

"H0e0l0l0o"

Loop though the characters and do whatever you feel is adequate. Not much to beginners level "encryption." So go write it!

I assume you used a search engine? Other wise look up "cipher," and "c++ encryption."

Liszt
Junior Poster
122 posts since Oct 2008
Reputation Points: 33
Solved Threads: 6
 

Well thats quite simple.

You should try reversing the string also.

However for the above encryption

Take in the string.
Then you should initialise another string
Take a char from the first string and then store it into the second one. Then add your '0' To the string and again add the second letter of the first string.

So a for loop must do the trick.

If you have tried doing that encryption. Just post the code so that we can help you out

Sky Diploma
Practically a Posting Shark
865 posts since Mar 2008
Reputation Points: 673
Solved Threads: 131
 

Sky Diploma,

Now I understand the idéa of encryption. My example was very simple just to understand.
I will be able to do something complex out of this.

Many thanks !!!

Liszt
Junior Poster
122 posts since Oct 2008
Reputation Points: 33
Solved Threads: 6
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You