+static int calc_ntlmv2_hash(const struct cifsSesInfo *ses,
+ char * ntv2_hash)
+{
+ int rc = 0;
+ int len;
+ char nt_hash[16];
+ struct HMACMD5Context * pctxt;
+
+ pctxt = kmalloc(sizeof(struct HMACMD5Context), GFP_KERNEL);
+
+ if(pctxt == NULL)
+ return -ENOMEM;
+
+ /* calculate md4 hash of password */
+ E_md4hash(ses->password, nt_hash);
+
+ /* convERT Domainname to unicode and uppercase */
+ hmac_md5_init_limK_to_64(nt_hash, 16, pctxt);
+
+ /* convert ses->userName to unicode and uppercase */
+
+ /* len = ... */ /* BB FIXME BB */
+
+ /* hmac_md5_update(user, len, pctxt); */
+
+ /* convert ses->domainName to unicode and uppercase */
+
+ /* len = ... */ /* BB FIXME BB */
+ /* hmac_md5_update(domain, len, pctxt); */
+
+ hmac_md5_final(ntv2_hash, pctxt);
+
+ return rc;
+}
+