summaryrefslogtreecommitdiff
path: root/source3/libsmb/smbencrypt.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-07 21:42:24 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-07 21:42:24 +0000
commit48b31ae44fb2a1961bd738b0b3e7a986259168a2 (patch)
treecb776f1cdce218ea1f904928eedab6c3b943e9d8 /source3/libsmb/smbencrypt.c
parentcf115a77d038dbd357cf476a6042f1bd5eb1e392 (diff)
downloadsamba-48b31ae44fb2a1961bd738b0b3e7a986259168a2.tar.gz
samba-48b31ae44fb2a1961bd738b0b3e7a986259168a2.tar.bz2
samba-48b31ae44fb2a1961bd738b0b3e7a986259168a2.zip
dce/rpc
(This used to be commit 6677b888bdb45df00646eb7cc13005b9465ff971)
Diffstat (limited to 'source3/libsmb/smbencrypt.c')
-rw-r--r--source3/libsmb/smbencrypt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index bf9736d724..44dcbd5e05 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -152,6 +152,18 @@ void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24])
E_P24(p21, c8, p24);
}
+/* Does the des encryption from the FIRST 8 BYTES of the NT or LM MD4 hash. */
+void NTLMSSPOWFencrypt(uchar passwd[8], uchar *ntlmchalresp, uchar p24[24])
+{
+ uchar p21[21];
+
+ memset(p21,'\0',21);
+ memcpy(p21, passwd, 8);
+ memset(p21 + 8, 0xbd, 8);
+
+ E_P24(p21, ntlmchalresp, p24);
+}
+
/* Does the NT MD4 hash then des encryption. */