Convert this PHP code to C#

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-04-19T16:08:48Z Indexed on 2010/04/19 16:13 UTC
Read the original article Hit count: 246

Filed under:
|
|

I've got this php code and I'd like to get the exact equivalent C#

$ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_CBC);
$iv = mcrypt_create_iv($ivSize, MCRYPT_RAND);
$encryptedData = mcrypt_encrypt(MCRYPT_RIJNDAEL_192, $key, $salt . $message . $nonce, MCRYPT_MODE_CBC, $iv);
$base64Data = base64_encode($salt . $iv . $encryptedData);
$urlEncodedData = rawurlencode($base64Data);

all contributions gratefully received

© Stack Overflow or respective owner

Related posts about php

Related posts about c#