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()
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:])
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:])
def _no_lmhash(password=''): if config.useLMhash(): warnings.warn( "Cannot import Crypto.Cipher.DES, lmhash passwords disabled.") return lmhash_locked()
def _no_lmhash(password=''): if config.useLMhash(): warnings.warn("Cannot import Crypto.Cipher.DES, lmhash passwords disabled.") return lmhash_locked()