-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Move pal_random to System.Native from CoreRT #16652
Conversation
|
We already have:
and
Can/should we avoid having another mechanism? cc: @bartonjs |
|
I am not going to add dependency from low-level runtime that just needs to generate a couple of good enough random numbers to the big crypto stack. Almost the same code is in CoreCLR PAL today. This is just to improve sharing between CoreCLR and CoreRT. |
|
Fair enough. We should just make sure we don't inadvertently start using this in places we should be using the other ones. Or alternatively if there's no reason to be using the others, just use this one. My uber point is how many different "get random bytes" functions do we actually need. |
|
@alexperovich This will let us move Unix GetRandomBytes to the shared corelib partition. |
|
I have renamed the method to |
|
Great. Thanks. |
|
@dotnet-bot test Innerloop OSX Debug Build and Test please |
Move pal_random to System.Native from CoreRT Commit migrated from dotnet/corefx@274d3c3
Move https://github.com/dotnet/corert/blob/master/src/Native/System.Private.CoreLib.Native/pal_random.cpp to System.Native so that it can be shared between CoreCLR and CoreRT CoreLibs