SQL ChangePass Plugin and SHA512

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
 Using sql changepass plugin, we are moving from md5crypt to sha512,
how would we set this to work with the new passwords format
$6$16charsalt$encryptedpassword

We have set password_encryption = 'PHPCRYPT';

But the example seem wrote 10 years ago when no-one heard of sha512

$csp_salt_query = 'SELECT SUBSTRING(password, 4,
LENGTH(SUBSTRING_INDEX(password, "$", 3)) - 3) FROM virtual_users
WHERE email = "%1"';

or is there an easier way we can modify plugin code to use it?

I know in perl we could do like
if (crypt($passtext, $dbpass) == $dbpass) {yay}

but not so good with php :-)

Thanks

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux