Bienvenue sur PEBKAC.fr, le site qui recense les anecdotes où l’on se moque des utilisateurs ne maîtrisant pas l’outil informatique. PEBKAC est un acronyme signifiant « Problem Exists Between Keyboard And Chair ».
~$ python
[...]
>>> from passlib.hash import sha512_crypt
>>> sha512_crypt.encrypt("mot de passe", rounds=1000)
'$6$rounds=1000$xvSeBV4RaqD0fF2O$RvX4x2kJAVq/R4/WrkwG7Q2GsPeCV.vQPUWF3xqQ8yRjLehhQVmycoSu1U7chCRDup1vRaS3Hu/5joVoTMey5/'
>>> timeit.timeit("from passlib.hash import sha512_crypt; sha512_crypt.verify('mot de passe', '$6$rounds=1000$xvSeBV4RaqD0fF2O$RvX4x2kJAVq/R4/WrkwG7Q2GsPeCV.vQPUWF3xqQ8yRjLehhQVmycoSu1U7chCRDup1vRaS3Hu/5joVoTMey5/')", number=1750)
0.9925789833068848
>>> timeit.timeit("from passlib.hash import sha512_crypt; sha512_crypt.verify('mauvais mot de passe', '$6$rounds=1000$xvSeBV4RaqD0fF2O$RvX4x2kJAVq/R4/WrkwG7Q2GsPeCV.vQPUWF3xqQ8yRjLehhQVmycoSu1U7chCRDup1vRaS3Hu/5joVoTMey5/')", number=1750)
1.482956886291504