perché in genere io non applico cosi la crittografia.
Ora perché non metti uno stacktrace? Non si sa mai cosa va male, anziché lasciare i catch vuoti metti un trace
Come fai la cifratura fai la decifratura, in modo simmetrico, te l'ho già detto.
Ma devi conoscere la password ed è lì il problema
codice:import java.io.*; class Decritto { public static void main(String args[]) throws Exception { FileReader fr = new FileReader("crittato.txt"); BufferedReader br = new BufferedReader(fr); String encrypted; //QUALE E' LA PASS??? COME FAI A CONOSCERLA?? //DesEncrypter encrypter = new DesEncrypter(str); DesEncrypter encrypter = new DesEncrypter("prova"); while ((encrypted = br.readLine()) != null) { System.out.println(encrypted); System.out.println("Encrypted: " + encrypted); String decrypted = encrypter.decrypt(encrypted); System.out.println("Decrypted: " + decrypted); } fr.close(); } }

Rispondi quotando