1/* This is a generated file */
2#ifndef __heimntlm_protos_h__
3#define __heimntlm_protos_h__
4
5#include <stdarg.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11int
12heim_ntlm_build_ntlm1_master (
13	void */*key*/,
14	size_t /*len*/,
15	struct ntlm_buf */*session*/,
16	struct ntlm_buf */*master*/);
17
18int
19heim_ntlm_build_ntlm2_master (
20	void */*key*/,
21	size_t /*len*/,
22	struct ntlm_buf */*blob*/,
23	struct ntlm_buf */*session*/,
24	struct ntlm_buf */*master*/);
25
26int
27heim_ntlm_calculate_lm2 (
28	const void */*key*/,
29	size_t /*len*/,
30	const char */*username*/,
31	const char */*target*/,
32	const unsigned char serverchallenge[8],
33	unsigned char ntlmv2[16],
34	struct ntlm_buf */*answer*/);
35
36int
37heim_ntlm_calculate_ntlm1 (
38	void */*key*/,
39	size_t /*len*/,
40	unsigned char challenge[8],
41	struct ntlm_buf */*answer*/);
42
43int
44heim_ntlm_calculate_ntlm2 (
45	const void */*key*/,
46	size_t /*len*/,
47	const char */*username*/,
48	const char */*target*/,
49	const unsigned char serverchallenge[8],
50	const struct ntlm_buf */*infotarget*/,
51	unsigned char ntlmv2[16],
52	struct ntlm_buf */*answer*/);
53
54int
55heim_ntlm_calculate_ntlm2_sess (
56	const unsigned char clnt_nonce[8],
57	const unsigned char svr_chal[8],
58	const unsigned char ntlm_hash[16],
59	struct ntlm_buf */*lm*/,
60	struct ntlm_buf */*ntlm*/);
61
62int
63heim_ntlm_calculate_ntlm2_sess_hash (
64	const unsigned char clnt_nonce[8],
65	const unsigned char svr_chal[8],
66	unsigned char verifier[8]);
67
68int
69heim_ntlm_decode_targetinfo (
70	const struct ntlm_buf */*data*/,
71	int /*ucs2*/,
72	struct ntlm_targetinfo */*ti*/);
73
74int
75heim_ntlm_decode_type1 (
76	const struct ntlm_buf */*buf*/,
77	struct ntlm_type1 */*data*/);
78
79int
80heim_ntlm_decode_type2 (
81	const struct ntlm_buf */*buf*/,
82	struct ntlm_type2 */*type2*/);
83
84int
85heim_ntlm_decode_type3 (
86	const struct ntlm_buf */*buf*/,
87	int /*ucs2*/,
88	struct ntlm_type3 */*type3*/);
89
90void
91heim_ntlm_derive_ntlm2_sess (
92	const unsigned char sessionkey[16],
93	const unsigned char */*clnt_nonce*/,
94	size_t /*clnt_nonce_length*/,
95	const unsigned char svr_chal[8],
96	unsigned char derivedkey[16]);
97
98int
99heim_ntlm_encode_targetinfo (
100	const struct ntlm_targetinfo */*ti*/,
101	int /*ucs2*/,
102	struct ntlm_buf */*data*/);
103
104int
105heim_ntlm_encode_type1 (
106	const struct ntlm_type1 */*type1*/,
107	struct ntlm_buf */*data*/);
108
109int
110heim_ntlm_encode_type2 (
111	const struct ntlm_type2 */*type2*/,
112	struct ntlm_buf */*data*/);
113
114int
115heim_ntlm_encode_type3 (
116	const struct ntlm_type3 */*type3*/,
117	struct ntlm_buf */*data*/,
118	size_t *mic_offset);
119
120void
121heim_ntlm_free_buf (struct ntlm_buf */*p*/);
122
123void
124heim_ntlm_free_targetinfo (struct ntlm_targetinfo */*ti*/);
125
126void
127heim_ntlm_free_type1 (struct ntlm_type1 */*data*/);
128
129void
130heim_ntlm_free_type2 (struct ntlm_type2 */*data*/);
131
132void
133heim_ntlm_free_type3 (struct ntlm_type3 */*data*/);
134
135int
136heim_ntlm_keyex_unwrap (
137	struct ntlm_buf */*baseKey*/,
138	struct ntlm_buf */*encryptedSession*/,
139	struct ntlm_buf */*session*/);
140
141int
142heim_ntlm_keyex_wrap (
143	struct ntlm_buf */*base_session*/,
144	struct ntlm_buf */*session*/,
145	struct ntlm_buf */*encryptedSession*/);
146
147int
148heim_ntlm_nt_key (
149	const char */*password*/,
150	struct ntlm_buf */*key*/);
151
152int
153heim_ntlm_ntlmv2_key (
154	const void */*key*/,
155	size_t /*len*/,
156	const char */*username*/,
157	const char */*target*/,
158	int upper_case_target,
159	unsigned char ntlmv2[16]);
160
161size_t
162heim_ntlm_unparse_flags (
163	uint32_t /*flags*/,
164	char */*s*/,
165	size_t /*len*/);
166
167int
168heim_ntlm_v1_base_session (
169	void */*key*/,
170	size_t /*len*/,
171	struct ntlm_buf */*session*/);
172
173int
174heim_ntlm_v2_base_session (
175	void */*key*/,
176	size_t /*len*/,
177	struct ntlm_buf */*ntlmResponse*/,
178	struct ntlm_buf */*session*/);
179
180int
181heim_ntlm_verify_ntlm2 (
182	const void */*key*/,
183	size_t /*len*/,
184	const char */*username*/,
185	const char */*target*/,
186	time_t /*now*/,
187	const unsigned char serverchallenge[8],
188	const struct ntlm_buf */*answer*/,
189	struct ntlm_buf */*infotarget*/,
190	unsigned char ntlmv2[16]);
191
192uint64_t
193heim_ntlm_unix2ts_time(time_t unix_time);
194
195time_t
196heim_ntlm_ts2unixtime(uint64_t t);
197
198#ifdef __cplusplus
199}
200#endif
201
202#endif /* __heimntlm_protos_h__ */
203