unicode.h 947 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
/*
 * Copyright (c) Edward Thomson.  All rights reserved.
 *
 * This file is part of ntlmclient, distributed under the MIT license.
 * For full terms and copyright information, and for third-party
 * copyright information, see the included LICENSE.txt file.
 */

#ifndef PRIVATE_UNICODE_H__
#define PRIVATE_UNICODE_H__

#include "compat.h"

14 15 16 17 18 19
#ifdef UNICODE_ICONV
# include "unicode_iconv.h"
#elif UNICODE_BUILTIN
# include "unicode_builtin.h"
#endif

20 21 22 23
#define NTLM_UNICODE_MAX_LEN	2048

typedef struct ntlm_unicode_ctx ntlm_unicode_ctx;

24
extern bool ntlm_unicode_init(ntlm_client *ntlm);
25 26 27 28

bool ntlm_unicode_utf8_to_16(
	char **converted,
	size_t *converted_len,
29
	ntlm_client *ntlm,
30 31 32 33 34 35
	const char *string,
	size_t string_len);

bool ntlm_unicode_utf16_to_8(
	char **converted,
	size_t *converted_len,
36
	ntlm_client *ntlm,
37 38 39
	const char *string,
	size_t string_len);

40
extern void ntlm_unicode_shutdown(ntlm_client *ntlm);
41 42

#endif /* PRIVATE_UNICODE_H__ */