emulate PHP "crypt" function in c#?

  • Thread starter Thread starter JamesB
  • Start date Start date
J

JamesB

Not sure if this is possible, but has anyone seen (or know how to do)
emulation of the PHP "crypt" function from within c#?

Thanks
 
JamesB said:
Not sure if this is possible, but has anyone seen (or know how to do)
emulation of the PHP "crypt" function from within c#?

Are you just trying to do cryptography in general, or does it have to
match the exact format/functionality of PHP's "crypt" function?
 
Jon Skeet said:
Are you just trying to do cryptography in general, or does it have to
match the exact format/functionality of PHP's "crypt" function?

Ideally I want to be able to "crypt" a string in a c# app, and get the same
hash that a bit of php code on a webserver would generate... I'll have a
play with the built in .net stuff and see what comes out I guess...
Thanks
 
JamesB said:
Ideally I want to be able to "crypt" a string in a c# app, and get the same
hash that a bit of php code on a webserver would generate... I'll have a
play with the built in .net stuff and see what comes out I guess...

Unfortunately it looks like that could vary significantly:

http://articles.techrepublic.com.com/5100-22-1058691.html
http://www.w3schools.com/php/func_string_crypt.asp

If you can work out exactly which one you want to support, the rest is
probably easy :)
 
Back
Top