Commit Graph

22 Commits

Author SHA1 Message Date
99a5b03f10 2y is also used for bcryt 2015-05-06 22:57:33 +02:00
42ea7f447f Many PHPDocs, some unused and dyn declared vars
many PHPDocs
some unused variables
some dynamically declared variables declared
2014-10-01 11:30:27 +02:00
08d5d52a34 FS#2829 check if auth_random is available in PassHash 2013-08-04 09:44:57 +02:00
483b6238a3 Add truly random numbers and use them in places where randomness matters 2013-07-30 18:55:18 +02:00
f1b824b5c0 added HMAC support to PassHash class FS#2794 2013-05-30 16:49:58 +02:00
dfbe4adfd0 added SHA512 hashing method FS#2663 2013-01-26 13:38:20 +01:00
925ad1487c allow varying salt length in password hasher 2013-01-26 13:37:56 +01:00
529b04166c added mediawiki password method FS#2559
This should make migrating from MediaWiki a bit easier.
2013-01-26 12:59:15 +01:00
e6101bb6d7 make MD5 crypt without salts always use PHP implementation
crypt seems to behave different on different systems when the salt
is empty.
2012-07-01 11:33:25 +02:00
29fbab8dda code cleanup 2012-06-23 14:08:40 +02:00
22f44d031d avoid integer overflow in PassHash::pmd5 method
Input iteration counts are squared in the function and passing something
above 30 is giving integer overflows on 32 bit systems (and causes insane
iteration counts on 64bit systems).
2012-05-01 21:18:17 +02:00
63703ba5bd coding style updates 2012-03-16 12:09:30 +01:00
d4dca43453 fixed error in bcrypt password method 2012-03-16 11:11:15 +01:00
5c73ae04fa Merge branch 'lmd5' into bcrypt
Conflicts:
	lib/plugins/config/settings/config.metadata.php
2011-11-27 11:11:01 +01:00
491a2c68bc renamed passhash method smd6 to lsmd5 2011-11-27 11:08:07 +01:00
502a92e072 MD5 password hash format of the LDAP RFC FS#2378
This implements the salted MD5 password hash format of the LDAP RFC.
The format is quite simple the password, followed by the 8 byte hash in
base64 encoding, which results in 32 characters, prepended with the
string "{smd5}".
2011-11-27 10:55:27 +01:00
e0dd04a649 Added bcrypt support for password hashes
This method require PHP 5.3+ it will fail otherwise!
2011-10-14 16:39:36 +02:00
7ae6f87a6c Fixed test and broken salt generation in PassHash class
Turned out a test wasn't really testing what it should have been testing
and thus did hide a bug. Still puzzles me why it still worked some
times.
This patch also sets the default iteration count for bmd5 and pmd5 to 8.
2011-10-14 16:05:57 +02:00
d6f9b0b399 fixed typo in PassHash class
The pure PHP implementation for smd5 failed.
2011-05-01 09:05:24 +02:00
62bbd5ef5f use a bigger range of characters for password salts 2011-01-23 11:15:33 +01:00
52c9860c6e django pass hashes have no leading $ 2011-01-23 10:55:23 +01:00
3a0a2d0563 refactored passowrd hashing functions to a class
this splits the long auth_cryptPassword() function into many member
functions of a new class PassHash which should make it more
maintainable and reusable for other projects.

This also adds two new methods djangomd5 and djangosha1 as used by the
popular python framework Django.

Maybe the auth_cryptPassword() and auth_verifyPassword() functions
should be deprecated in favor of using the class directly?
2011-01-22 22:03:54 +01:00