#include <unistd.h>
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include "smbbyteorder.h"
return 0;
}
-
-/*******************************************************************
-safe string copy into a known length string. maxlength does not
-include the terminating zero.
-********************************************************************/
-
static void strupper(char *s)
{
while (*s)
* Creates the MD4 Hash of the users password in NT UNICODE.
*/
-static void E_md4hash(uchar *passwd, uchar *p16)
+static void E_md4hash(unsigned char *passwd, unsigned char *p16)
{
int len;
int16_t wpwd[129];
}
/* Does the NT MD4 hash then des encryption. */
-
void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24)
{
unsigned char p21[21];
dump_data(100, (char *)p24, 24);
#endif
}
-
-#if 0
-
-BOOL make_oem_passwd_hash(char data[516], const char *passwd, unsigned char old_pw_hash[16], BOOL unicode)
-{
- int new_pw_len = strlen(passwd) * (unicode ? 2 : 1);
-
- if (new_pw_len > 512)
- {
- DEBUG(0,("make_oem_passwd_hash: new password is too long.\n"));
- return False;
- }
-
- /*
- * Now setup the data area.
- * We need to generate a random fill
- * for this area to make it harder to
- * decrypt. JRA.
- */
- generate_random_buffer((unsigned char *)data, 516, False);
- if (unicode)
- {
- struni2( &data[512 - new_pw_len], passwd);
- }
- else
- {
- fstrcpy( &data[512 - new_pw_len], passwd);
- }
- SIVAL(data, 512, new_pw_len);
-
-#ifdef DEBUG_PASSWORD
- DEBUG(100,("make_oem_passwd_hash\n"));
- dump_data(100, data, 516);
-#endif
- SamOEMhash( (unsigned char *)data, (unsigned char *)old_pw_hash, True);
-
- return True;
-}
-
-#endif