Why is this new version being released?
In our previous release, we promised a final version of our library. However, we have since added new features that we believe will greatly enhance the functionality and security of our library. This new release introduces encryption features to our library, enabling a higher level of data protection.
What's new in this release?
We have added SHA256 encryption to the events system to ensure the "non-reversibility" of data sent in events. This means that once data has been sent, it cannot be easily reversed or altered.
The Initialize method now includes a new parameter: the encryption key. This key can be any string you choose, such as a password or a long number. You can generate a random password using the generatekey
command on the server console. This key can then be used as the encryption key.
It's important to note that FXEvents will not save the encrypted key anywhere. It's your responsibility to store it securely and pass it to clients as necessary.
How to use the new encryption features
Here's an example of how to use the new encryption features:
We've also added two new extension methods to the library:
void EncryptObject<T>(string passkey)
T DecryptObject<T>(string passkey)
These methods serialize your instanced objects internally into binary code and then encrypt those very bytes with SHA256 encryption, so you won't need to serialize before encrypting. Same thing for decryption.
The passkey parameter is used to give you the flexibility to encrypt/decrypt with any key you want, as long as the keys are the same for encryption/decryption.
These methods are also used with the initialized key internally to ensure events encryption.
What's Changed
- chore: fix formatting and version by @Local9 in #17
- fix: packing errors in client project by @Local9 in #18
- Update README.md by @Whoeza in #20
- fix: correctly instance singleton by @Local9 in #22
- fix: issues created with instancing a singleton by @Local9 in #23
New Contributors
Full Changelog: 2.5...2.6