コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: password_hash.py プロジェクト: Alexander--/samba
 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)