Encryption - nixfanboy/WrathNet GitHub Wiki
Data Layer Encryption
WrathNet Engine has a built-in data encryption layer that uses a PSK (Pre-Shared Key, like a password) and a hash salt to encrypt data using AES before it leaves and decrypts data before it is processed. To enable this feature, simply invoke the 'enableDataCompression( Encryption.generateKey(String passphrase, String salt ));' method in BOTH the Client object and the corresponding Server object. Data can not be properly read if the Client and Server have different keys/salts or data encryption is only enabled on one end of the infrastructure. To disable data encryption, invoke the 'disableDataCompression();' method in both the Client object and the Server object. This encryption is done using the WrathUtils Encryption Class. You currently must install JCE Unlimited Strength Jurisdiction Policy Files from Oracle and decompress the file in your JRE's 'lib/security' folder. This is only planned to be a temporary function and should be running without this prerequisite soon. The links are as follows:
WARNING: Enabling data-layer encryption uses significantly more processing power for both the Client and Server and can delay network activities in the application (increase latency). Additionally, the encrypted data being sent between the Server and Client is INFLATED, even with Compression enabled. As a result, more bandwidth is used in order to have encrypted data.
SSL/TLS Encryption (TCP Only)
To enable SSL Transport-Layer-Security encryption on a TCP Client or Server, simply append the 'wrath.net.SessionFlag.USE_SSL' to the constructor of both the Client and the Server. The Client and Server must BOTH have the USE_SSL SessionFlag present OR absent in order for communications to work. SSL is currently a planned feature and does not work in the latest build.