473,394 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

emulate PHP "crypt" function in c#?

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
3 4080
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
"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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: Steve Juranich | last post by:
I know that this topic has the potential for blowing up in my face, but I can't help asking. I've been using Python since 1.5.1, so I'm not what you'd call a "n00b". I dutifully evangelize on the...
0
by: David | last post by:
I want to use MD5, the framework has MD5 but the problem is that the php crypt function use a "salt" to encrypt the information. :( Thanks
1
by: steve | last post by:
Hi, I have a set of passwords encrypted using perl’s crypt, from a perl forum being migrated to php. I like to bring them into php, and use them without changing them. How do I emulate perl’s...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
12
by: Matthew Wilson | last post by:
Hi, we are getting a lot of spam through our PHP Feedback form, and have set up a new field 'prove you're human', asking them to do some simple maths. What is the command for the PHP script...
1
by: dananrg | last post by:
Is there a module available in the standard library, for Python 2.4 running on Windows, like "crypt" for Python 2.4 running on *nix machines? I need to store database passwords in a Python 2.4...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.