【发布时间】:2015-05-31 18:18:38
【问题描述】:
虽然我已经阅读了一些帖子,但我并没有设法解决我的问题!
我正在尝试使用对称加密制作客户端服务器应用程序。所以这就是我要做的。
这是我在服务器上的时间
while ((inputLine = in.readLine()) != null) {
AES_Cipher.init (Cipher.DECRYPT_MODE, AES_Key);
plaintext_decrypted = AES_Cipher.doFinal (inputLine.getBytes("UTF-8"));
System.out.println("Server receive : "+ plaintext_decrypted);
System.out.println("type message :");
outputLine = stdIn.readLine();
out.println(outputLine);
}
在我放这行之前plaintext_decrypted = AES_Cipher.doFinal (inputLine.getBytes("UTF-8"));
一切正常。但是当我尝试解密我的消息时,它会崩溃:/
【问题讨论】:
标签: java connection client server socketexception