Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
PHPSecLib for Python?
  • 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 :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion