pcrypt 1.0.5

Creator: railscoder56

Last updated:

Add to Cart

Description:

pcrypt 1.0.5

# python-crypt [![Build Status](https://travis-ci.org/thusoy/python-crypt.svg?branch=master)](https://travis-ci.org/thusoy/python-crypt)Pure-python implementation of the crypt(3) SHA2 functions.Useful for creating crypt-compatible hashes from non-*nixes (like Windowsand OS X), like when creating password hashes to initialize a *nix serverwith.## Install You can't use 'macro parameter character #' in math modeYou can't use 'macro parameter character #' in math mode6tyjS23QPnY6k37iD7oM9nObOVQUQ<...>/x7VKbuiyqgT81If you want to override the number of rounds used for hashing, you can specify the parameter `rounds` to crypt: >>> print(pcrypt.crypt(getpass.getpass(), rounds=50000)) 6rounds=50000FEkeiFqoGiU6Bd3v6jn8ZZ<...>uXKvs7XAbp.The default number of rounds is 5000, same as for crypt(3).To use SHA256 instead of the default SHA512: >>> print(pcrypt.crypt(getpass.getpass(), pcrypt.METHOD_SHA256)) 5Zcxyug8MUozUjGIQyqvzOQR<...>pnLMvpOhhmrOWfn5Ifthesecondargumentisgivenitmustbeeitheranexistingsaltstringmatchingtheformat‘<algo>(rounds=<rounds>)?<salt>(<hash>)?‘,oroneof‘pcrypt.METHODSHA256‘or‘pcrypt.METHODSHA512‘.Withoutspecifyingsaltmanuallythemodulewillgenerateanewsaltandusethestrongesthashfunctionavailable.Asalittleextranugget,there′salsoahandyCLItoquicklygenerateahash: pcrypt -h usage: pcrypt [-h] [-r ROUNDS] [-a {sha256,sha512}] [-s] Compute a password hash for SHA256/SHA512 in crypt(3)-compatible format. Password will be prompted for. optional arguments: -h, --help show this help message and exit -r ROUNDS, --rounds ROUNDS How many rounds of hashing to perform. More rounds are slower, making it harder to reverse a hash through brute force. Default: 5000 -a {sha256,sha512}, --algo {sha256,sha512} Which algorithm to use. Default: sha512 -s, --single-prompt Don't ask to repeat the password**NB**: You'd probably guess from this being a pure-python implementation of a compute-heavy operation, but I just have to say this explicitly: Do not use this for performance-critical applications! Performance is roughly five orders of magnitude slower than the plain C version.Change log==========[1.0.5] - 2018-01-12--------------------### Fixed- Only print trailing newline in cli when writing to a tty.[1.0.4] - 2016-02-08--------------------### Added- Passwords can now be piped in to the pcrypt CLI.[1.0.3] - 2015-12-19--------------------Practically first release.[1.0.5]: https://github.com/thusoy/python-crypt/compare/v1.0.4...v1.0.5[1.0.4]: https://github.com/thusoy/python-crypt/compare/v1.0.3...v1.0.4

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.