473,569 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4085
On Wed, 5 Mar 2008 09:26:08 -0000, "JamesB"
<ja****@somewhe re.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******@coldm ail.comwrote in message
news:is******** *************** *********@4ax.c om...
On Wed, 5 Mar 2008 09:26:08 -0000, "JamesB"
<ja****@somewhe re.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.co mwrote in message
news:MP******** *************@m snews.microsoft .com...
JamesB <ja****@somewhe re.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
3000
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 goodness of Python whenever I talk with fellow developers, but I always hit a snag when it comes to discussing the finer points of the execution...
0
1156
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
3230
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 crypt function. I found a pear module here: http://pear.php.net/package/Crypt_CBC/docs/0.3/Crypt/Crypt_CBC.html but it seems to only take one...
0
9736
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. I need it to be compiled with threads. Anyone have any wisdom on how best to do this? Here's a transcript of my latest attempt. It's long; you...
12
3016
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 itself, to say "this field must be equal to 9 or return the error page"? Thanks! Matt
1
3825
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 script, but obviously don't want them in clear text. I'm looking for a reasonable level of security. What are some of my options?
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.