Bonjour, je cherche a mettre en place un algorithme de chiffrement utilisant césar mais à la compilation j'ai un probleme que je n'arrive pas a dterminer....merci d'avance pour votre aide !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 ///////////////////////////////////////// ///// chiffrement utilisant cesar ////// /////////////////////////////////////// char* cesar_crypt(int decallage, char * texte) { int i; int c; char* crypt; int cp = decallage; size_t sz = strlen(texte) + 1; crypt = malloc(sz); for(i=0; i < sz ; i++) { c = texte[i]; c = (char(int((c-'a') + (cp-'a'))%26) + 'a'); crypt[i] = c; } return crypt; free(crypt); }
Partager