#hash #password #python #django #crypto

app djpass

A command-line tool to generate and verify passwords used in Django project

13 releases (5 stable)

1.2.1 Dec 7, 2021
1.1.0 Jun 20, 2020
1.0.1 Aug 21, 2019
1.0.0 Jan 19, 2019
0.2.0 Mar 30, 2016

#3 in #django

Download history 108/week @ 2022-05-31 31/week @ 2022-06-07 4/week @ 2022-06-21 1/week @ 2022-06-28 1176/week @ 2022-07-05 27/week @ 2022-07-12 14/week @ 2022-07-19 21/week @ 2022-07-26 3/week @ 2022-08-02 3/week @ 2022-08-16 14/week @ 2022-08-23 3/week @ 2022-08-30 29/week @ 2022-09-06 18/week @ 2022-09-13

64 downloads per month

BSD-3-Clause

10KB
118 lines

djpass (Django Passwords)

Build Status

A command-line tool to generate and verify passwords used in Django Project.

Installation

You can compile from source, or install via cargo (requires version 0.6.0 or higher):

$ cargo install djpass

Usage

Generating a Password Hash

If you run it without arguments it will ask for a password:

$ djpass
Password: [password]
Hash: pbkdf2_sha256$24000$...

Passing the password as a single argument will return the hash:

$ djpass hello
Hash: pbkdf2_sha256$24000$...

You can also specify the algorithm used:

$ djpass hello -a sha1
Hash: sha1$hzPiRIKYykm8$23...

Algorithms:

  • PBKDF2 (default)
  • PBKDF2SHA1
  • Argon2
  • Scrypt
  • BCryptSHA256
  • BCrypt
  • SHA1
  • MD5
  • UnsaltedSHA1
  • UnsaltedMD5
  • Crypt

The algorithm argument is case-insensitive.

Verifying a Password Hash

$ djpass hello 'sha1$hzPiRIKYykm8$23...'
Password ok.

If you pass an algorithm during verification it will be ignored.

Contributing

  • Be polite, I'm new to Rust, like almost everybody.
  • Don't go nuts with your mad-rust-skillz, legibility is a priority.
  • Always include a unit test.

License

Djpass is released under the 3-Clause BSD License.

tl;dr: "free to use as long as you credit me".

Dependencies

~2.5MB
~63K SLoC