version 1.1.1.2, 2016/11/01 09:56:12
|
version 1.1.1.3, 2021/03/17 00:39:23
|
Line 55
|
Line 55
|
void |
void |
LMPasswordHash(const char *password, u_char *hash) |
LMPasswordHash(const char *password, u_char *hash) |
{ |
{ |
const u_char *const clear = (u_char *) "KGS!@#$%%"; | const u_char* clear = (const u_char *)"KGS!@#$%%"; |
u_char up[14]; /* upper case password */ |
u_char up[14]; /* upper case password */ |
int k; | unsigned k; |
|
|
memset(&up, 0, sizeof(up)); |
memset(&up, 0, sizeof(up)); |
for (k = 0; k < sizeof(up) && password[k]; k++) |
for (k = 0; k < sizeof(up) && password[k]; k++) |
Line 78 void
|
Line 78 void
|
NTPasswordHash(const char *password, u_char *hash) |
NTPasswordHash(const char *password, u_char *hash) |
{ |
{ |
u_int16_t unipw[128]; |
u_int16_t unipw[128]; |
int unipwLen; | unsigned unipwLen; |
MD4_CTX md4ctx; |
MD4_CTX md4ctx; |
const char *s; |
const char *s; |
|
|
Line 107 NTPasswordHashHash(const u_char *nthash, u_char *hash)
|
Line 107 NTPasswordHashHash(const u_char *nthash, u_char *hash)
|
MD4_CTX md4ctx; |
MD4_CTX md4ctx; |
|
|
MD4_Init(&md4ctx); |
MD4_Init(&md4ctx); |
MD4_Update(&md4ctx, (u_char *) nthash, 16); | MD4_Update(&md4ctx, nthash, 16); |
MD4_Final(hash, &md4ctx); |
MD4_Final(hash, &md4ctx); |
} |
} |
|
|
Line 181 DesEncrypt(const u_char *clear, u_char *key0, u_char *
|
Line 181 DesEncrypt(const u_char *clear, u_char *key0, u_char *
|
|
|
/* Encrypt using key */ |
/* Encrypt using key */ |
|
|
DES_ecb_encrypt((DES_cblock *) clear, (DES_cblock *) cypher, &ks, 1); | #ifdef __clang__ |
| #pragma clang diagnostic push |
| #pragma clang diagnostic ignored "-Wcast-qual" |
| #endif |
| DES_ecb_encrypt((const_DES_cblock *) clear, (DES_cblock *) cypher, &ks, 1); |
| #ifdef __clang__ |
| #pragma clang diagnostic pop |
| #endif |
} |
} |
|
|
/* |
/* |