python - crypt does not work in osx, returns wrong value -


I'm using an OSX 10.9 (last version) with the previous Xcode. When I execute the following command:

  Python-C 'import crypt; Print crypt.crypt ( "test", "$ 6 $ random_salt") ' 

I get it as an answer:

  $ 6asQOJRqB1i2  

but if I Debian machine (he performs the same in the same version of Python) then I get the following:

  $ 6 $ random_salt $ sJ0ZOQCUESBs9rYCOLCqGV93zg1cSDgZV / FF6ZBzpnvNUVODwaaVoPV2SiL0ur7Sexh02hMmXdSBOa216GWoh  

what's wrong with my machine?

< Implementation of Mac OS X code> crypt () Linux glibc Most "advanced" modes supported by crypt () do not support. It only "conventional crypt () " are the supports that you're here, and "extended crypt () " mode that is compatible with Linux implementation Not so either

If you need to create a portable strong password in Linux and Mac OS X, then you will need to use any other than crypt () .

/ div>

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -