Description
Private field s_seed is always set to 0 due to a bug in method GetRandomBytes.
In this method the parameter byte* buffer is always overwritten, so random value is lost.
We can easily reproduce the problem with this code.
var seed = typeof(HashCode).GetField("s_seed", BindingFlags.NonPublic | BindingFlags.Statics);
This problem don't existe in .NET Core implementation.
Configuration
.NET Framework
Regression?
It's not really a regression but not the expected behavior.
People using this package want the same behavior than in .NET core.
And if it's not fixed, I think this package should be mark as deprecated.
Description
Private field
s_seedis always set to 0 due to a bug in methodGetRandomBytes.In this method the parameter
byte* bufferis always overwritten, so random value is lost.We can easily reproduce the problem with this code.
var seed = typeof(HashCode).GetField("s_seed", BindingFlags.NonPublic | BindingFlags.Statics);This problem don't existe in .NET Core implementation.
Configuration
.NET Framework
Regression?
It's not really a regression but not the expected behavior.
People using this package want the same behavior than in .NET core.
And if it's not fixed, I think this package should be mark as deprecated.