def string_to_key(cls, string, salt, params): utf8string = get_string(string) tmp = Credentials() tmp.set_anonymous() tmp.set_password(utf8string) nthash = tmp.get_nt_hash() return Key(cls.enctype, nthash)
def checkNtHash(self, password, nt_hash): creds = Credentials() creds.set_anonymous() creds.set_password(password) expected = creds.get_nt_hash() actual = bytearray(nt_hash) self.assertEquals(expected, actual)
def checkNtHash(self, password, nt_hash): creds = Credentials() creds.set_anonymous() creds.set_password(password) expected = creds.get_nt_hash() actual = bytearray(nt_hash) self.assertEquals(expected, actual)