diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/smbdes.c | 4 | ||||
-rw-r--r-- | source3/libsmb/smbencrypt.c | 9 |
2 files changed, 5 insertions, 8 deletions
diff --git a/source3/libsmb/smbdes.c b/source3/libsmb/smbdes.c index ba214a2eb0..e60b93d6a2 100644 --- a/source3/libsmb/smbdes.c +++ b/source3/libsmb/smbdes.c @@ -259,7 +259,7 @@ static void dohash(char *out, char *in, char *key, int forw) permute(out, rl, perm6, 64); } -static void str_to_key(unsigned char *str,unsigned char *key) +static void str_to_key(const uchar *str, uchar *key) { int i; @@ -277,7 +277,7 @@ static void str_to_key(unsigned char *str,unsigned char *key) } -void smbhash(unsigned char *out, const uchar *in, unsigned char *key, int forw) +void smbhash(unsigned char *out, const uchar *in, const uchar *key, int forw) { int i; char outb[64]; diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index 3227caaa95..ace6cdc300 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -444,21 +444,18 @@ BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[ return True; } -BOOL nt_decrypt_string2(STRING2 *out, const STRING2 *in, char nt_hash[16]) +BOOL nt_decrypt_string2(STRING2 *out, const STRING2 *in, const uchar *key) { uchar bufhdr[8]; int datalen; - uchar key[16]; - uchar *keyptr = key; - uchar *keyend = key + sizeof(key); + const uchar *keyptr = key; + const uchar *keyend = key + 16; uchar *outbuf = (uchar *)out->buffer; const uchar *inbuf = (const uchar *)in->buffer; const uchar *inbufend; - mdfour(key, nt_hash, 16); - smbhash(bufhdr, inbuf, keyptr, 0); datalen = IVAL(bufhdr, 0); |