sdrapkin / SecurityDriven.Core

Modern, fast, safe, cryptographically strong .NET replacement for Random and RandomNumberGenerator.
MIT License
115 stars 3 forks source link

SecurityDriven.Core vs SecurityDriven.Inferno #6

Open hippus opened 2 years ago

hippus commented 2 years ago

Hi, could you please clarify

sdrapkin commented 2 years ago

is CryptoRandom in this library different from main lib (SecurityDriven.Inferno) and how?

Yes, they are different. [SecurityDriven.Inferno] has been designed for .NET Framework 4.x (on Windows) many years ago, and its CryptoRandom implementation is functionally correct but has an older and less performant implementation. [SecurityDriven.Core] is a newer more performant implementation which takes advantage of everything .NET 5+ has to offer.

which lib is better to use?

If you can use both libraries, prefer [SecurityDriven.Core] for all randomness needs, and use [SecurityDriven.Inferno] for cryptography. If you can only use [SecurityDriven.Inferno] (ex. cannot run .NET 5+), CryptoRandom in Inferno works.