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

i need help to encrypt characters

Broken from here .

I Have quite the same probem . But I'm block at this point :

#include<iostream>
using std::cout;
using std::endl;
unsignedint uiStringSize = 0;
/* prototype fct encrypt */
void encrypt( char * );
/* prototype fct decrypt */
void decrypt( char * );
char i=0 ;
int main()
{
// string to encrypt
char string[] = "this is a secret";
uiStringSize= sizeof( string ); int
 
cout << "original string of character : " << string << endl; 
encrypt( string );
cout << "encrypt string is : " << string << endl;
decrypt( string );
cout << "decrypt string is : " << string << endl;
return 0;
} 
 
void encrypt( char e[] )
{
/* Here I have to write the function that will encrypt each letter +1 */
for ( i=0; i= uiStringSize; i++) // not sure, miss something
} 
void decrypt( char *ePtr )
{
/* decrypt fct */
for ( i=0; i= uiStringSize; i++) // ......
 
}
toche
Newbie Poster
1 post since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

Is that really your code, because it won't even compile.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You