0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 04:50:44 -05:00
Refringe c071702851
Better Random (#972)
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>
2024-12-06 16:25:44 +00:00
..
2024-07-23 11:12:53 -04:00
2024-12-06 16:25:44 +00:00
2024-07-23 11:12:53 -04:00