summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-09-14 04:36:19 +0000
committerTim Potter <tpot@samba.org>2001-09-14 04:36:19 +0000
commit504eff41b3a357bd500c2faa2a3385584e4949d4 (patch)
tree9af6eb48583304c3f1797e2276e924c46ecf0401
parentc849bd3196ee52d4f9e3e68435c577481b72548f (diff)
downloadsamba-504eff41b3a357bd500c2faa2a3385584e4949d4.tar.gz
samba-504eff41b3a357bd500c2faa2a3385584e4949d4.tar.bz2
samba-504eff41b3a357bd500c2faa2a3385584e4949d4.zip
Merge prs_hash1() function from tng.
(This used to be commit 3245714243d15160b9e0e27c413fef65ea91f455)
-rw-r--r--source3/rpc_parse/parse_prs.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 11fa46069a..d34465e8b4 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1210,3 +1210,27 @@ int tdb_prs_fetch(TDB_CONTEXT *tdb, char *keystr, prs_struct *ps, TALLOC_CTX *me
return 0;
}
+
+/*******************************************************************
+ hash a stream.
+ ********************************************************************/
+BOOL prs_hash1(prs_struct *ps, uint32 offset, uint8 sess_key[16])
+{
+ char *q;
+
+ q = prs_data_p(ps);
+ q = &q[offset];
+
+#ifdef DEBUG_PASSWORD
+ DEBUG(100, ("prs_hash1\n"));
+ dump_data(100, sess_key, 16);
+ dump_data(100, q, 68);
+#endif
+ SamOEMhash((uchar *) q, sess_key, 68);
+
+#ifdef DEBUG_PASSWORD
+ dump_data(100, q, 68);
+#endif
+
+ return True;
+}