Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. void cifrar(int numero_cifras, int cantidad_numeros, char texto[]) {
  2.  
  3.  
  4. int letra, letrass, x;
  5. char cifrado_inside[strlen(texto)*numero_cifras];
  6. char string_auxiliar[numero_cifras-1];
  7. for(letra=0; strlen(texto)>letra; letra++) {
  8.  
  9.  
  10. for(letrass=0; letrass<numero_de_letras; letrass++) {
  11.  
  12. if (texto[letra]==letras[letrass]) {
  13.  
  14. sprintf(string_auxiliar, "%.0lf", claves[letrass][(int)(aleatorio(cantidad_numeros-1, 0))]);
  15. strcat(cifrado_inside, string_auxiliar);
  16. break;
  17. }
  18.  
  19. }
  20.  
  21. }
  22. strcpy(cifrado, cifrado_inside);
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement