In this test, the icall for GetBytes() is getting corrupted data for the array length. using System.Security.Cryptography; using System; namespace NS { class C { public static int Main() { RNGCryptoServiceProvider _algo = new RNGCryptoServiceProvider(); byte[] random = new byte[25]; _algo.GetBytes(random); return 0; } } } Nick D.