Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to decrypt C# code in php

 
Dinesh Pise
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I have written code C# for encryption using Rijndael algorithm.Now i want to decrypt it in php. I tried for that but not getting exact string which i encrypted.
Below is the encryption code for C#.



Decryption code in php is



Using above php code ,I am not getting original value. Kindly advice.....

Regards,
Dinesh Pise
 
Nick Charles
Ranch Hand
Posts: 71
Linux PHP Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would first verify that a specific plain text string gets encrypted to the exact same encrypted and encoded string in both environments. If not, then the algorithms are not compatible (perhaps due to differences in interpretation of the algorithm, or perhaps in one group 'tweaking' the algorithm to 'make it better'). If the encoded strings are not the same, you will have to try other algorithms until you find one that generates the same encoded string on both platforms.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic