Reference(s): http://docs.python.org/library/crypt.html http://helpful.knobs-dials.com/index.php/Hashing_notes http://php.net/manual/en/function.crypt.php http://carey.geek.nz/code/python-fcrypt/ >>> crypt_generic_passwd(password='rasmuslerdorf', salt='rl',
(password, salt, **kwargs)
| 353 | return retVal.upper() if uppercase else retVal.lower() |
| 354 | |
| 355 | def crypt_generic_passwd(password, salt, **kwargs): |
| 356 | """ |
| 357 | Reference(s): |
| 358 | http://docs.python.org/library/crypt.html |
| 359 | http://helpful.knobs-dials.com/index.php/Hashing_notes |
| 360 | http://php.net/manual/en/function.crypt.php |
| 361 | http://carey.geek.nz/code/python-fcrypt/ |
| 362 | |
| 363 | >>> crypt_generic_passwd(password='rasmuslerdorf', salt='rl', uppercase=False) |
| 364 | 'rl.3StKT.4T8M' |
| 365 | """ |
| 366 | |
| 367 | return getText(crypt(password, salt)) |
| 368 | |
| 369 | def unix_md5_passwd(password, salt, magic="$1$", **kwargs): |
| 370 | """ |