summaryrefslogtreecommitdiff
path: root/source4/libcli/auth
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r--source4/libcli/auth/credentials.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/libcli/auth/credentials.c b/source4/libcli/auth/credentials.c
index 80ea2e9583..1749037e8f 100644
--- a/source4/libcli/auth/credentials.c
+++ b/source4/libcli/auth/credentials.c
@@ -109,3 +109,14 @@ void creds_authenticator(struct netr_CredentialState *creds,
next->cred = creds->cred2;
next->timestamp = creds->sequence;
}
+
+
+/*
+ encrypt a 16 byte password buffer using the session key
+*/
+void creds_encrypt(struct netr_CredentialState *creds, struct netr_Password *pass)
+{
+ struct netr_Password tmp;
+ cred_hash3(tmp.data, pass->data, creds->session_key, 1);
+ *pass = tmp;
+}