i need help to encrypt characters

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2006
Posts: 1
Reputation: toche is an unknown quantity at this point 
Solved Threads: 0
toche toche is offline Offline
Newbie Poster

i need help to encrypt characters

 
0
  #1
Nov 8th, 2006
Broken from here.

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


  1.  
  2. #include<iostream>
  3. using std::cout;
  4. using std::endl;
  5. unsignedint uiStringSize = 0;
  6. /* prototype fct encrypt */
  7. void encrypt( char * );
  8. /* prototype fct decrypt */
  9. void decrypt( char * );
  10. char i=0 ;
  11. int main()
  12. {
  13. // string to encrypt
  14. char string[] = "this is a secret";
  15. uiStringSize= sizeof( string ); int
  16.  
  17. cout << "original string of character : " << string << endl;
  18. encrypt( string );
  19. cout << "encrypt string is : " << string << endl;
  20. decrypt( string );
  21. cout << "decrypt string is : " << string << endl;
  22. return 0;
  23. }
  24.  
  25. void encrypt( char e[] )
  26. {
  27. /* Here I have to write the function that will encrypt each letter +1 */
  28. for ( i=0; i= uiStringSize; i++) // not sure, miss something
  29. }
  30. void decrypt( char *ePtr )
  31. {
  32. /* decrypt fct */
  33. for ( i=0; i= uiStringSize; i++) // ......
  34.  
  35. }
Last edited by WolfPack; Nov 9th, 2006 at 12:01 am. Reason: Added old thread link and changed the heading. Also added [CODE=C][/CODE] tags.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: i need help to encrypt characters

 
0
  #2
Nov 9th, 2006
Is that really your code, because it won't even compile.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC