Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-hash

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-hash

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

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
232
decreased by-11.11%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 05 Jul 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc