hex.h File Reference

#include <isc/lang.h>
#include <isc/types.h>

Go to the source code of this file.

Defines

#define ISC_HEX_H   1

Functions

ISC_LANG_BEGINDECLS isc_result_t isc_hex_totext (isc_region_t *source, int wordlength, const char *wordbreak, isc_buffer_t *target)
 Convert data into hex encoded text.
isc_result_t isc_hex_decodestring (const char *cstr, isc_buffer_t *target)
 Decode a null-terminated hex string.
isc_result_t isc_hex_tobuffer (isc_lex_t *lexer, isc_buffer_t *target, int length)
 Convert hex encoded text from a lexer context into data.


Detailed Description

Definition in file hex.h.


Define Documentation

#define ISC_HEX_H   1

Definition at line 21 of file hex.h.


Function Documentation

ISC_LANG_BEGINDECLS isc_result_t isc_hex_totext ( isc_region_t source,
int  wordlength,
const char *  wordbreak,
isc_buffer_t target 
)

Convert data into hex encoded text.

Notes:

Requires: Ensures:

Definition at line 51 of file hex.c.

References isc_region::base, hex, ISC_R_SUCCESS, isc_region_consume, isc_region::length, RETERR, and str_totext().

Referenced by generate_salt(), totext_cds(), totext_dlv(), totext_ds(), totext_hip(), totext_nsec3(), totext_nsec3param(), totext_sshfp(), totext_tlsa(), and unknown_totext().

isc_result_t isc_hex_decodestring ( const char *  cstr,
isc_buffer_t target 
)

Decode a null-terminated hex string.

Requires:

Returns: Other error returns are any possible error code from: isc_lex_create(), isc_lex_openbuffer(), isc_hex_tobuffer().

Definition at line 159 of file hex.c.

References hex_decode_char(), hex_decode_finish(), hex_decode_init(), ISC_R_SUCCESS, and RETERR.

Referenced by check_options(), fromtext_hip(), fromtext_nsec3(), fromtext_nsec3param(), load_configuration(), main(), ns_server_signing(), save_opt(), and setup_lookup().

isc_result_t isc_hex_tobuffer ( isc_lex_t lexer,
isc_buffer_t target,
int  length 
)

Convert hex encoded text from a lexer context into data.

Requires:

Ensures:

Definition at line 129 of file hex.c.

References isc_tokenvalue_t::as_textregion, isc_textregion::base, hex_decode_char(), hex_decode_finish(), hex_decode_init(), ISC_FALSE, isc_lex_getmastertoken(), isc_lex_ungettoken(), ISC_R_SUCCESS, isc_tokentype_string, ISC_TRUE, isc_textregion::length, hex_decode_ctx_t::length, RETERR, token, isc_token::type, and isc_token::value.

Referenced by fromtext_cds(), fromtext_dlv(), fromtext_ds(), fromtext_sshfp(), fromtext_tlsa(), and unknown_fromtext().


Generated on Tue Apr 28 17:41:15 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha