I was trying to access .NET class and was having some issues I was hoping someone could help me with.
What I'm trying to do is get a random number of bytes using [URL="http://msdn.microsoft.com/en-us/library/system.security.cryptography.rngcryptoserviceprovider.getbytes.aspx"]RNGCryptoServiceProvider[/URL]I'm having issues with passing data parameter. I've tried various different things but seem to get this error message 'Error [0x80070057] The parameter is incorrect. '.
Here's the code I've put together.
try {
$net= new DOTNET("mscorlib", "System.Security.Cryptography.RNGCryptoServiceProvider");
$var = new VARIANT(1);
$net->GetBytes($var);
print_r($var);
} catch (Exception $e) {
echo $e->getMessage();
}