but why???

by santoprova on July 22nd, 2010
No notes
Syntax: C
Show lines - Hide lines - Show in textbox - Download
char initVect[11]="1234567890"; //puntatore vettore di inizializzazione (sempre 10 caratteri di lunghezza)
 
char myPassword[]="cazzodibuddha";
 
 
 
    char * skey=malloc(strlen(myPassword)+10+1);
      for (x=0;x<strlen(myPassword);x++)
      {
          skey[x]=myPassword[x];
      }
       for (x=strlen(myPassword);x<strlen(myPassword)+10;x++)
      {
          skey[x]=initVect[x-strlen(myPassword)];
      }
 
  printf ("\n\n Valore skey : -->%s<--; \n lunghezza skey:%i \n", skey, strlen(myPassword)+10);
 
 
 
OUTPUT: 
 
 Valore skey : -->cazzodibuddha1234567890iòzP«Åð<--;
 lunghezza skey:23

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS