lib/algorithms/hashing_algs.py
def ntlm(string, **placeholder):
    """
      Create an NTLM hash, identical to the one used in Windows protocol

      > :param string: string to be hashed
      > :return: a NTLM hashed string

      Example:
        >>> ntlm("test")
        0cb6948805f797bf2a82807973b89537
    """
    if type(string) is unicode:
        string = lib.settings.force_encoding(string)
    obj = hashlib.new("md4")
    obj.update(string.encode("utf-16le"))
    data = obj.digest()
    return binascii.hexlify(data)

      Create an NTLM hash, identical to the one used in Windows protocol

      > :param string: string to be hashed
      > :return: a NTLM hashed string

      Example:
        >>> ntlm("test")
        0cb6948805f797bf2a82807973b89537
    
Create an NTLM hash, identical to the one used in Windows protocol
> :param string: string to be hashed
> :return: a NTLM hashed string
Create an NTLM hash identical to the one used in Windows protocol > : param string : string to be hashed > : return : a NTLM hashed string
def ntlm(string, **placeholder):
    if type(string) is unicode:
        string = lib.settings.force_encoding(string)
    obj = hashlib.new("md4")
    obj.update(string.encode("utf-16le"))
    data = obj.digest()
    return binascii.hexlify(data)
def ntlm ( string , ** placeholder ) : if type ( string ) is unicode : string = lib . settings . force_encoding ( string ) obj = hashlib . new ( "md4" ) obj . update ( string . encode ( "utf-16le" ) ) data = obj . digest ( ) return binascii . hexlify ( data )
Create an NTLM hash, identical to the one used in Windows protocol
> :param string: string to be hashed
> :return: a NTLM hashed string
Create an NTLM hash identical to the one used in Windows protocol > : param string : string to be hashed > : return : a NTLM hashed string
"""
      Create an NTLM hash, identical to the one used in Windows protocol

      > :param string: string to be hashed
      > :return: a NTLM hashed string

      Example:
        >>> ntlm("test")
        0cb6948805f797bf2a82807973b89537
    """
string
examples
None