This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with cygwin crypt function


On May 27 11:55, bertrand marquis wrote:
> Hello
>   
>    i need to use the cygwin crypt function to compare the result with 
> the result of the linux string function.
> 
> Under linux i crypt the string with a salt and then i have to remove the 
> first characters to remove the salt from the result string.
> But under cygwin it seems that i only have a 13 char string with no salt 
> at the beginning and this result string is completely different from the 
> linux result string with the same input.
> 
> Does anyone know a way to solve that

Using the right crypt function under Linux, perhaps.  The crypt function
is defined to return the encrypted password.  Using DES, this is always
13 characters, including the salt.  Hint: Download the sources of the
Cygwin crypt package and compile the tiny crypt.c tool under Linux (needs
minor tweaking.  Replace `#include "encrypt.h"' by `#include <unistd.h>').


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]