Unix crypt() under windows.
-
Hello gurus. I'm currently programming am application for windows 2000 (in Visual Studio C++ 6.0). It's a program that creates LDIF files that will be used to update a LDAP entries. (openLDAP) I've run into one problem tough. Is there a function/library in VSC++ that is similar to the unix crypt()? (using md5 or the ldap {crypt}) Yes, I'm a beginner, but I'm learning. :laugh:
-
Hello gurus. I'm currently programming am application for windows 2000 (in Visual Studio C++ 6.0). It's a program that creates LDIF files that will be used to update a LDAP entries. (openLDAP) I've run into one problem tough. Is there a function/library in VSC++ that is similar to the unix crypt()? (using md5 or the ldap {crypt}) Yes, I'm a beginner, but I'm learning. :laugh:
Franz Granlund wrote: Hello gurus. Hi there. :) Franz Granlund wrote: Is there a function/library in VSC++ that is similar to the unix crypt()? Try to use CryptoAPI. Maybe you will find it too complex, but it should fulfil your requirements.
-
Franz Granlund wrote: Hello gurus. Hi there. :) Franz Granlund wrote: Is there a function/library in VSC++ that is similar to the unix crypt()? Try to use CryptoAPI. Maybe you will find it too complex, but it should fulfil your requirements.
Thank you for your answer, but that is way to complex for me.. =) Do you know of any other library? Or could you help me get started? It's such a small application, that I don't wan't to spend to much time figuring the crypto-world out. :) (Yes, I wan't to learn someday, but not today. :)) :laugh:
-
Thank you for your answer, but that is way to complex for me.. =) Do you know of any other library? Or could you help me get started? It's such a small application, that I don't wan't to spend to much time figuring the crypto-world out. :) (Yes, I wan't to learn someday, but not today. :)) :laugh:
I am not sure if using some library would be easier. Try to write short pseudocode, what you are doing in your UNIX code and I will reply with MS Crypto API version.
-
I am not sure if using some library would be easier. Try to write short pseudocode, what you are doing in your UNIX code and I will reply with MS Crypto API version.
First, thank you very much for trying to help me out! Well, I wan't a crypt() functionality of a linux system that uses PAM and MD5 password enabled. (The linux dist is Redhat 7.3) A short code written and compiled under linux: #include int main() { char p[100]; // Allocate this dynamically later.. char s[100]; char *e; strcpy(p, "fan"); strcpy(s, "xe"); e = crypt(p, s); printf("Password: %s\nEncrypted: %s\n",p, e); return 0; } The output: $ ./m Password: fan Encrypted: xeY7nbSvmz7jU Hope you get some information from this code.. Again, thank you for trying to help.
-
First, thank you very much for trying to help me out! Well, I wan't a crypt() functionality of a linux system that uses PAM and MD5 password enabled. (The linux dist is Redhat 7.3) A short code written and compiled under linux: #include int main() { char p[100]; // Allocate this dynamically later.. char s[100]; char *e; strcpy(p, "fan"); strcpy(s, "xe"); e = crypt(p, s); printf("Password: %s\nEncrypted: %s\n",p, e); return 0; } The output: $ ./m Password: fan Encrypted: xeY7nbSvmz7jU Hope you get some information from this code.. Again, thank you for trying to help.
Well, when it is Linux, you have to have sources for it, including crypt() function, have you tried to port to Win32? And, do you expect to get the same result (xeY7nbSvmz7jU), or you just do not care and encrypted password is enough for you (I mean, you do not require interoperability then between your new code on Windows and old code on Linux)?
-
Hello gurus. I'm currently programming am application for windows 2000 (in Visual Studio C++ 6.0). It's a program that creates LDIF files that will be used to update a LDAP entries. (openLDAP) I've run into one problem tough. Is there a function/library in VSC++ that is similar to the unix crypt()? (using md5 or the ldap {crypt}) Yes, I'm a beginner, but I'm learning. :laugh:
try crypto++. i think there is a tutorial somewhere on this site for it. -c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.
/. #3848917Image Processing - easy, like Sunday morning.
-
Hello gurus. I'm currently programming am application for windows 2000 (in Visual Studio C++ 6.0). It's a program that creates LDIF files that will be used to update a LDAP entries. (openLDAP) I've run into one problem tough. Is there a function/library in VSC++ that is similar to the unix crypt()? (using md5 or the ldap {crypt}) Yes, I'm a beginner, but I'm learning. :laugh:
Franz, See this article. /ravi Let's put "civil" back into "civilization" http://www.ravib.com ravib@ravib.com