示例#1
0
def lmhash(password=b''):
    """
    Generates lanman password hash for a given password.

    Note that the author thinks LanMan hashes should be banished from
    the face of the earth.
    """

    if not config.useLMhash():
        return lmhash_locked()

    return passlib_lmhash.hash(password).encode('ascii').upper()
示例#2
0
def _have_lmhash(password=''):
    """
    Generates lanman password hash for a given password.

    Note that the author thinks LanMan hashes should be banished from
    the face of the earth.
    """

    if not config.useLMhash():
        return lmhash_locked()

    password = (password + 14 * '\0')[:14]
    password = password.upper()

    return _deshash(password[:7]) + _deshash(password[7:])
示例#3
0
def _have_lmhash(password=''):
    """
    Generates lanman password hash for a given password.

    Note that the author thinks LanMan hashes should be banished from
    the face of the earth.
    """

    if not config.useLMhash():
        return lmhash_locked()

    password = (password+14*'\0')[:14]
    password = password.upper()

    return _deshash(password[:7]) + _deshash(password[7:])
示例#4
0
def _no_lmhash(password=''):
    if config.useLMhash():
        warnings.warn(
            "Cannot import Crypto.Cipher.DES, lmhash passwords disabled.")
    return lmhash_locked()
示例#5
0
def _no_lmhash(password=''):
    if config.useLMhash():
        warnings.warn("Cannot import Crypto.Cipher.DES, lmhash passwords disabled.")
    return lmhash_locked()