![](/img/trans.png)
[英]“java.net.SocketException: Connection reset” when running a simpleSSL client
[英]java.net.SocketException: Connection reset server-client
盡管我已經閱讀了一些帖子,但並沒有解決我的問題!
我正在嘗試使用對稱加密制作客戶端服務器應用程序。 所以這就是我要做的。
這是我在服務器上的時間
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"));
一切正常。 但是當我嘗試解密我的消息時,它會崩潰:/
doFinal(),
使用update(),
假設發送者也這樣做了),這很有可能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.