Decrypt Python/django Password With Symfony 2.5 (using Symfony Security)
Solution 1:
You have to write password encoder on your own. Django uses following password format:
<algorithm>$<iterations>$<salt>$<hash>
It means hash uses the PBKDF2 algorithm with a SHA256 hash, 12000 iterations, dVPTWPll8poG
salt (for this particular password) and password hash itself is 3weiWwv4P/2GgYjeJBeUN/Hlbe1UByCj7ZRVX93FBZE=
(BASE64 encoded).
Symfony has password encoder for PBKDF2 but it does not support Django format. You can just modify built-in password encoder. You have to extract iterations, salt and pbkdf hash from string in database. The rest is the same as in default encoder.
https://github.com/symfony/security-core/blob/2.5/Encoder/Pbkdf2PasswordEncoder.php
Here is another stackoverflow answer on how to write own password encoder.
Symfony2 create own encoder for storing password
Hope that's help.
Solution 2:
Django uses hashing to store user passwords. Depending on your settings.PASSWORD_HASHERS
setting it will use one of these functions.
You will have to port same hashing algorithm in php
Post a Comment for "Decrypt Python/django Password With Symfony 2.5 (using Symfony Security)"