Need to use RNGCryptoServiceProvider in PHP, help!

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 error: Uncaught exception 'com_exception'
with message 'Error [0x80070057] The parameter is incorrect.

Any ideas?

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
zelnaga [ Mi, 17 Februar 2010 17:56 ] [ ID #2032646 ]
PHP » gmane.comp.php.windows » Need to use RNGCryptoServiceProvider in PHP, help!

Vorheriges Thema: "this variant has no properties"?
Nächstes Thema: 64-bit PHP binaries