Re: Converting PHP code to C#?
| From: | Symbian | Date: | Sun, 09 Sep 2007 05:40:01 +0000 |
| Subject: | Re: Converting PHP code to C#? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-261863@lists.php.net to get a copy of this message | ||
mike-22 wrote:
>
> i'm pretty sure the IV mattered in our stuff.
>
> and remember i used CBC i think not EBC, and it worked fine. not sure
> if you want to try that and make it work for you or not without any
> warnings :)
>
Ah! We're using EBC, also I realised that I needed to implement the
eqivalent of the pack function in PHP which we use, so I finally have the
correct (MD5'd both the PHP and C# bits) string going *into* the function.
Now I have to wrestle with the Rijndael class again:(
Rijndael r = Rijndael.Create();
r.Mode = CipherMode.ECB;
r.Padding = PaddingMode.None;
r.Key = Encoding.ASCII.GetBytes(KEY);
ICryptoTransform de = r.CreateDecryptor();
byte[] output = CryptoTransform(input, de);
Sym
--
View this message in context: http://www.nabble.com/Converting-PHP-code-to-C---tf4397727.html#a12576182
Sent from the PHP - General mailing list archive at Nabble.com.