mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 02:30:43 -05:00
This started as a small update. This pull request includes updates to the `RandomUtil` class to improve the security and accuracy of random number generation by utilizing the `node:crypto` module. Additionally, it enhances the documentation and refactors several methods for clarity and performance. Includes tests, both before and after the changes. The only *possible* breaking change is that now the `getKey`, `getKeyValue`, and `drawRandomFromDict` methods are typed with generics instead of `any`. I tried to keep them as *generic* as possible, but we should probably include this in a BE to ensure it doesn't break anything. No further changes are planned--Saved as a draft because it's late and I still want to review. --------- Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>