diff options
Diffstat (limited to 'source/libsmb/smbencrypt.c')
-rw-r--r-- | source/libsmb/smbencrypt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index 1de2ca53084..c87ff61fdfc 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/libsmb/smbencrypt.c @@ -28,13 +28,13 @@ This implements the X/Open SMB password encryption It takes a password, a 8 byte "crypt key" and puts 24 bytes of encrypted password into p24 */ -void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24) +void SMBencrypt(const uchar *passwd, uchar *c8, uchar *p24) { uchar p14[15], p21[21]; memset(p21,'\0',21); memset(p14,'\0',14); - StrnCpy((char *)p14,(char *)passwd,14); + StrnCpy((char *)p14,(const char *)passwd,14); strupper((char *)p14); E_P16(p14, p21); @@ -53,13 +53,13 @@ void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24) * Creates the MD4 Hash of the users password in NT UNICODE. */ -void E_md4hash(uchar *passwd, uchar *p16) +void E_md4hash(const uchar *passwd, uchar *p16) { int len; int16 wpwd[129]; /* Password cannot be longer than 128 characters */ - len = strlen((char *)passwd); + len = strlen(passwd); if(len > 128) len = 128; /* Password must be converted to NT unicode - null terminated. */ @@ -138,7 +138,7 @@ void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24]) /* Does the NT MD4 hash then des encryption. */ -void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24) +void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24) { uchar p21[21]; |