Module refinery.units.crypto.hash.password_hashes

Implements password hashing algorithms.

Expand source code Browse git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Implements password hashing algorithms.
"""
from refinery.units.crypto.hash import HashUnit


class ntlm(HashUnit):
    """
    Returns the Windows NTLM hash of the input.
    """
    def _algorithm(self, data: bytes) -> bytes:
        from Cryptodome.Hash import MD4
        return MD4.new(data.decode(self.codec).encode('utf-16le'))

Classes

class ntlm (text=False)

Returns the Windows NTLM hash of the input.

Expand source code Browse git
class ntlm(HashUnit):
    """
    Returns the Windows NTLM hash of the input.
    """
    def _algorithm(self, data: bytes) -> bytes:
        from Cryptodome.Hash import MD4
        return MD4.new(data.decode(self.codec).encode('utf-16le'))

Ancestors

Class variables

var required_dependencies
var optional_dependencies

Inherited members