[PHP-WIN] Need to use RNGCryptoServiceProvider in PHP, help!

2010-02-17 Thread Thomas Anderson
Hi, I need to use RNGCryptoServiceProvider in PHP. I have tried: $rng = new DOTNET("mscorlib", "System.Security.Cryptography.RNGCryptoServiceProvider"); $arr = array(0); $v = new VARIANT($arr,VT_ARRAY); $rng->GetBytes($v); unset($rng); The component loads fine. But I got this error: Fatal erro

[PHP-WIN] "this variant has no properties"?

2010-02-17 Thread Thomas Anderson
RegRead('HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography\\RNG\\Seed'); var_dump($random->value); sleep(1); echo "\r\n"; } ?> That gives me a "this variant has no properties" error. My question is... how on earth does it not have any properties? As the following VBscript is tes

[PHP-WIN] Re: "this variant has no properties"?

2010-02-17 Thread Thomas Anderson
When it comes to doing things with the registry, PHP4 seems to be better than PHP5: getBinaryValue(0x8002, 'SOFTWARE\\Microsoft\\Cryptography\\RNG', 'Seed', $values); var_dump($values->value); ?> That works as expected on PHP4. On PHP5, it gives yet another "this variant has no properties" e