Skip to content
Snippets Groups Projects
Commit b55aaf19 authored by mgh16's avatar mgh16
Browse files

agora sim cifrando certo

parent 50b2f3a6
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ int main(){
for(int itr = 0; itr < num_chaves; itr++){
printf("itr %d de %d \n", itr, num_chaves);
int mod_text_pela_chave = (tamanho_texto) % chaves_parciais[itr];
int caracteres_p_completar = mod_text_pela_chave;
int caracteres_p_completar = chaves_parciais[itr]-mod_text_pela_chave;
printf("completando %d caracteres, texto tinha %d\n", caracteres_p_completar, tamanho_texto);
......@@ -59,6 +59,9 @@ int main(){
texto_cifrado[tamanho_texto+i]='X';
}
tamanho_texto+=caracteres_p_completar;
int caracteresporlinha = (tamanho_texto+mod_text_pela_chave)/chaves_parciais[itr];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment