20 #ifndef WINPR_UTILS_NTLM_H
21 #define WINPR_UTILS_NTLM_H
26 #include <winpr/winpr.h>
27 #include <winpr/wtypes.h>
28 #include <winpr/sspi.h>
35 typedef SECURITY_STATUS (*psPeerComputeNtlmHash)(
void* client,
36 const SEC_WINNT_AUTH_IDENTITY* authIdentity,
38 const BYTE* randkey,
const BYTE* mic,
39 const SecBuffer* micvalue, BYTE* ntlmhash);
41 WINPR_API BOOL NTOWFv1W(LPWSTR Password, UINT32 PasswordLength, BYTE* NtHash);
42 WINPR_API BOOL NTOWFv1A(LPSTR Password, UINT32 PasswordLength, BYTE* NtHash);
44 WINPR_API BOOL NTOWFv2W(LPWSTR Password, UINT32 PasswordLength, LPWSTR User, UINT32 UserLength,
45 LPWSTR Domain, UINT32 DomainLength, BYTE* NtHash);
46 WINPR_API BOOL NTOWFv2A(LPSTR Password, UINT32 PasswordLength, LPSTR User, UINT32 UserLength,
47 LPSTR Domain, UINT32 DomainLength, BYTE* NtHash);
49 WINPR_API BOOL NTOWFv2FromHashW(BYTE* NtHashV1, LPWSTR User, UINT32 UserLength, LPWSTR Domain,
50 UINT32 DomainLength, BYTE* NtHash);
51 WINPR_API BOOL NTOWFv2FromHashA(BYTE* NtHashV1, LPSTR User, UINT32 UserLength, LPSTR Domain,
52 UINT32 DomainLength, BYTE* NtHash);
59 #define NTOWFv1 NTOWFv1W
60 #define NTOWFv2 NTOWFv2W
61 #define NTOWFv2FromHash NTOWFv2FromHashW
63 #define NTOWFv1 NTOWFv1A
64 #define NTOWFv2 NTOWFv2A
65 #define NTOWFv2FromHash NTOWFv2FromHashA