I've been trying to figure out the implementation of RNGCryptoServiceProvider.GetBytes to answer the title question.
To rephrase, does the GetBytes method generate a stream/array of bits, and then just sequentially write them to the byte array, such that I could recreate the original stream/array by looping over the bytes in order and looking at the bits in each byte?
I checked the source as found here: rngcryptoserviceprovider.cs, but it calls out to the CLR apparently, and I don't know how to get the source for that.
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode), SuppressUnmanagedCodeSecurity]
[ResourceExposure(ResourceScope.None)]
private static extern void GetBytes(SafeProvHandle hProv, byte[] randomBytes, int count);