작성한 메소드가 도달 할 수없는 것처럼 보입니다. 나는 아래의 방법을 붙여 해요 : encryption.decrypt_data(new FileInputStream("C:/Users/Acer/Desktop/encrypted"),new FileOutputStream("C:/Users/Acer/Desktop/decrypted"));
Class_name 유형에 대해 method_name (FileInputStream, FileOutputStream) 메소드가 정의되지 않았습니다.
이클립스는 저에게 말한다 : 나는 다음과 같이 클래스의 인스턴스를 사용하여이 메서드를 호출하기 위해 노력하고있어
public void decryt_data(InputStream in, OutputStream out) throws InvalidKeyException, IOException {
// initialize the cipher
cipher.init(Cipher.DECRYPT_MODE, secret_key);
// Bytes read from in will be decrypted
in = new CipherInputStream(in, cipher);
int numRead = 0;
while ((numRead = in.read(buf)) >= 0)
{
out.write(buf, 0, numRead);
}
out.close();
}
(메소드 decrypt_data을 FileInputStream에를, 다음 메서드 호출이 완벽하게 잘 작동하지만 FileOutputStream에)는 유형 AES (예 : 클래스 이름)
에 대한 정의입니다 :
encryption.encrypt_data(new FileInputStream(fc.getSelectedFile().getPath()),new FileOutputStream("C:/Users/Acer/Desktop/encrypted"));
도움을 기다리고 있습니다. D Thanks.
는 별도의 문제로 문의하시기 바랍니다. 질문을 완전히 바꾸면 답변에서 연결이 끊어 지므로 사람들에게 도움이되지 않습니다. –
좋아요. 죄송 해요. – SidNoob
너무 현지화 된 것으로 닫습니다. 철자법상의 실수로 다른 사람을 도울 수 없기 때문에 어떤 방식 으로든 당신을 처벌 할 수는 없습니다. –