Public/Private Key Generation
The private and the corresponding public key can be generated
Private and public key can be passed to the factories. However, if you choose a factory method with no public/private key parameter, they will be automatically generated.
Enable RSA En/Decryption
Use the ConnectionFactory to create a secure connection.
ConnectionFactory.CreateSecureClientConnectionContainer(... ConnectionFactory.CreateSecureServerConnectionContainer(... ConnectionFactory.CreateSecureTcpConnection(... ConnectionFactory.CreateSecureUdpConnection(...
There is nothing to consider while using RSA. (No code adjustments either) Establishing a UDP connection with a SecureTcpConnection will automatically create a SecureUdpConnection.
- RSA connections are slower; compared to normal connections.
- RSA packets are larger; compared to nromal packets.
Switch current code-base to RSA
Simply replace .CreateClientConnectionContainer with .CreateSecureConnectionContainer and .CreateServerConnectionContainer with .CreateSecureServerConnectionContainer.