Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void chiffrer(int cle, char* mot)
- {
- int taille = strlen(mot);
- int compteur = 0;
- for (int i = 0; i<taille; i++)
- {
- if (verification(mot,i)==0)
- {
- mot[i]=mot[(taille+cle)%26];
- }
- if (verification(mot,i)==1)
- {
- mot[i]=mot[(taille+cle)%26];
- }
- if (verification(mot,i)==2)
- {
- mot[i]=mot[(taille+cle)%10];
- }
- else
- {
- while (compteur != cle )
- {
- mot[i]=mot[i+1]%127;
- if (verification(mot,i)==3)
- {
- compteur++;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement