18
18
/*
19
19
* LM_Password_Hash: this function create a LM password hash from a given password
20
20
*/
21
- static unsigned char * LM_Password_Hash (const unsigned char * password , unsigned char * cipher )
21
+ static unsigned char * LM_Password_Hash (const char * password , unsigned char * cipher )
22
22
{
23
- unsigned char tmp_pass [14 ] = {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0" };
23
+ char tmp_pass [14 ] = {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0" };
24
24
unsigned char K1 [7 ];
25
25
unsigned char K2 [7 ];
26
26
int i ;
@@ -38,18 +38,18 @@ static unsigned char *LM_Password_Hash(const unsigned char *password, unsigned c
38
38
memcpy (K2 , & tmp_pass [7 ], 7 );
39
39
40
40
/* encrypt the magic string with the keys */
41
- DES (K1 , "KGS!@#$%" , & cipher [0 ]);
42
- DES (K2 , "KGS!@#$%" , & cipher [8 ]);
41
+ DES (K1 , ( unsigned char * ) "KGS!@#$%" , & cipher [0 ]);
42
+ DES (K2 , ( unsigned char * ) "KGS!@#$%" , & cipher [8 ]);
43
43
44
44
return (unsigned char * )cipher ;
45
45
}
46
46
47
47
/*
48
48
* NTLM_Password_Hash: this function create a NTLM password hash from a given password
49
49
*/
50
- static unsigned char * NTLM_Password_Hash (const unsigned char * password , unsigned char * cipher )
50
+ static unsigned char * NTLM_Password_Hash (const char * password , unsigned char * cipher )
51
51
{
52
- u8 passwd_buf [512 ];
52
+ char passwd_buf [512 ];
53
53
int i , j ;
54
54
55
55
memset (passwd_buf , 0 , sizeof (passwd_buf ));
@@ -59,7 +59,7 @@ static unsigned char *NTLM_Password_Hash(const unsigned char *password, unsigned
59
59
passwd_buf [j ] = password [i ];
60
60
61
61
/* get the message digest */
62
- MD4 (passwd_buf , j , cipher );
62
+ MD4 (( unsigned char * ) passwd_buf , j , cipher );
63
63
64
64
return (unsigned char * )cipher ;
65
65
}
@@ -93,7 +93,7 @@ static unsigned char *LM_Response(const unsigned char *LMpasswordhash, unsigned
93
93
/*
94
94
* GenerateLMHashes: function used to generate LM/NTLM hashes
95
95
*/
96
- static void GenerateLMHashes (char * Password , int PasswordType , u8 * EncryptionKey , int * PasswordLen , u8 * Buffer )
96
+ static void GenerateLMHashes (char * Password , int PasswordType , u8 * EncryptionKey , int * PasswordLen , char * Buffer )
97
97
{
98
98
u8 LMpasswordhash [16 ];
99
99
u8 NTLMpasswordhash [16 ];
0 commit comments