In Auth package PHPSecLib is used to hash password. Is there any Python implementation of that library so I could create user from Fuel and check his password from python script?
Do I only need base64_encode and PBKDF2 implementations?
You should be able to use https://github.com/dlitz/python-pbkdf2, but make sure you use the same parameters as are used by the Auth module:
- 10000 iterations,
- SHA256 as digestmethod,
- use 'read(32)' as described in the readme to make sure the correct key length is used
- and don't forget the salt that is configured in the Auth's config file
After commenting out salt modyfications:
salt = "$p5k2$%x$%s" % (iterations, salt)
Changing read(24) to read(32) from crypt function.
And ignoring first 25 characters from generated hash, hash from Fuel and from python lib matches