Git Product home page Git Product logo

pwdhash's People

Contributors

abbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pwdhash's Issues

License

Hi,
under what license is this project published? Can you attach LICENSE.TXT or something like that ("'License :: OSI Approved :: BSD License'," in config.py isn't enough)?
Without this IMO I can't fork it and modify.
Wiktor

Add support for unicode passwords

Copying from #2, something roughly like:

def mangle(s): return "".join(chr(ord(x) & 0xff) for x in s)

def generate(password, uri):
    """
    generate the pwdhash password for master password and uri or
    domain name.
    """
    realm = extract_domain(uri)
    if password.startswith(_password_prefix):
        password = password[len(_password_prefix):]

    password_hash = b64_hmac_md5(mangle(password), realm)
    size = len(password) + len(_password_prefix)
    nonalphanumeric = len(re.findall(r'\W', password)) != 0

    return apply_constraints(password_hash, size, nonalphanumeric)

How to install?

I downloaded pwdhash-master.zip and unzipped it, but I'm not sure what is the best way to install pwdhash.py. This is on "Bash on Ubuntu on Windows" (aka "Windows Subsystem for Linux"), which includes python, but no python-setuptools. What do you recommend?

Thank you!

Explicitly call hmad constructor with md5 hash

kousu gave at heads up that:

     digestmod: A module supporting PEP 247.  *OR*
                A hashlib constructor returning a new hash object. *OR*
                A hash name suitable for hashlib.new().
                Defaults to hashlib.md5.
                Implicit default to hashlib.md5 is deprecated and will be
                removed in Python 3.6.

So instead of relying on MD5 being the default for hashlib, explicitly call hashlib constructor with md5 digest module/object/whatever.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.