By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,369 Members | 1,533 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,369 IT Pros & Developers. It's quick & easy.

emulate PHP "crypt" function in c#?

P: n/a
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

Mar 5 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Wed, 5 Mar 2008 09:26:08 -0000, "JamesB"
<ja****@somewhere.com.net.com.netwrote:
>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
According to http://www.phpbuilder.com/manual/en/function.crypt.php
the PHP cryp() function may use either DES or MD5. Both of these are
available in .NET

rossum

Mar 5 '08 #2

P: n/a
"rossum" <ro******@coldmail.comwrote in message
news:is********************************@4ax.com...
On Wed, 5 Mar 2008 09:26:08 -0000, "JamesB"
<ja****@somewhere.com.net.com.netwrote:
>>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
According to http://www.phpbuilder.com/manual/en/function.crypt.php
the PHP cryp() function may use either DES or MD5. Both of these are
available in .NET

rossum

There is also such a thing as a PHP .NET complier. In a pinch you could
incorporate it that way, but I'm not sure what other PHP runtime components
are required.
See http://www.php-compiler.net/doku.php
--
Roger Frost
"Logic Is Syntax Independent"

Mar 5 '08 #3

P: n/a

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP*********************@msnews.microsoft.com. ..
JamesB <ja****@somewhere.com.net.com.netwrote:
>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?
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

Mar 5 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.