Socket
Socket
Sign inDemoInstall

django-hash

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    django-hash

Django hash & verify (pbkdf2_sha256) password in auth_user table.


Version published
Weekly downloads
262
increased by35.05%
Maintainers
1
Install size
2.63 kB
Created
Weekly downloads
 

Readme

Source

Django Hash

Hash and verify password in auth_user table that created with django admin.

Install

npm i django-hash

How to hash

const djangoHash = require('django-hash');

const password = 'p@ssw0rd';

djangoHash.hash(password)
  .then(hash => {
    console.log('Hashed: ', hash);
  })
  .catch(err => console.log(err));
// Hashed: pbkdf2_sha256$100000$hxtU/X2nCSo=$WREDUhqfScrEya9kjkHtK/T4hhRG1Y22roZS2EkJSWU=

How to verify

const djangoHash = require('django-hash');

const hash = 'pbkdf2_sha256$100000$hxtU/X2nCSo=$WREDUhqfScrEya9kjkHtK/T4hhRG1Y22roZS2EkJSWU=';

// with match password
djangoHash.verify('p@ssw0rd', hash)
  .then(result => {
    console.log('Verified: ', result);
  })
  .catch(err => console.log(err));
// Verified: true

// with wrong password
djangoHash.verify('wrong_password', hash)
  .then(result => {
    console.log('Verified: ', result);
  })
  .catch(err => console.log(err));
// Verified: false

Keywords

FAQs

Last updated on 05 Jul 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc