refactoring de cipher.c