Package me.panjohnny.jip.security
Class ServerSecurityLayer
java.lang.Object
me.panjohnny.jip.security.SecurityLayer
me.panjohnny.jip.security.ServerSecurityLayer
- All Implemented Interfaces:
TransportMiddleware
Implementace bezpečnostní vrstvy na straně serveru. Používá se k přijetí handshake od klienta a odeslání RSA klíče zpět. Každý klient má svůj vlastní.
- Since:
- 1.0
- Author:
- Jan Štefanča
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptClientHandshake
(byte[] handshake) Přijme handshake od klienta a zašifruje AES klíč pomocí RSA.Vytvoří handshake paket obsahující zašifrovaný AES klíč.Methods inherited from class me.panjohnny.jip.security.SecurityLayer
decrypt, encrypt, encryptRSA, generateAESKey, processIO, processRead, processWrite, setAESKey
-
Constructor Details
-
ServerSecurityLayer
public ServerSecurityLayer()
-
-
Method Details
-
acceptClientHandshake
Přijme handshake od klienta a zašifruje AES klíč pomocí RSA.- Parameters:
handshake
- handshake data od klienta- Throws:
SecureTransportException
- pokud se nepodaří zašifrovat AES klíč
-
createHandshakePacket
Vytvoří handshake paket obsahující zašifrovaný AES klíč.- Returns:
- handshake paket
-