view src/auth/password-scheme-ntlm.c @ 4891:6ab2712f1a93 HEAD

Only imap binary was actually working.
author Timo Sirainen <tss@iki.fi>
date Sun, 10 Dec 2006 14:35:02 +0200
parents 6531fd0f779f
children
line wrap: on
line source


#include "lib.h"
#include "hex-binary.h"
#include "password-scheme.h"

#include "ntlm.h"

const char *password_generate_lm(const char *pw)
{
	unsigned char hash[LM_HASH_SIZE];

	lm_hash(pw, hash);

	return binary_to_hex_ucase(hash, sizeof(hash));
}

const char *password_generate_ntlm(const char *pw)
{
	unsigned char hash[NTLMSSP_HASH_SIZE];

	ntlm_v1_hash(pw, hash);

	return binary_to_hex_ucase(hash, sizeof(hash));
}