Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/bind9/isc
File: base32.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
#ifndef ISC_BASE32_H
[11] Fix | Delete
#define ISC_BASE32_H 1
[12] Fix | Delete
[13] Fix | Delete
/*! \file */
[14] Fix | Delete
[15] Fix | Delete
/*
[16] Fix | Delete
* Routines for manipulating base 32 and base 32 hex encoded data.
[17] Fix | Delete
* Based on RFC 4648.
[18] Fix | Delete
*
[19] Fix | Delete
* Base 32 hex preserves the sort order of data when it is encoded /
[20] Fix | Delete
* decoded.
[21] Fix | Delete
*
[22] Fix | Delete
* Base 32 hex "np" is base 32 hex but no padding is produced or accepted.
[23] Fix | Delete
*/
[24] Fix | Delete
[25] Fix | Delete
#include <isc/lang.h>
[26] Fix | Delete
#include <isc/types.h>
[27] Fix | Delete
[28] Fix | Delete
ISC_LANG_BEGINDECLS
[29] Fix | Delete
[30] Fix | Delete
/***
[31] Fix | Delete
*** Functions
[32] Fix | Delete
***/
[33] Fix | Delete
[34] Fix | Delete
isc_result_t
[35] Fix | Delete
isc_base32_totext(isc_region_t *source, int wordlength,
[36] Fix | Delete
const char *wordbreak, isc_buffer_t *target);
[37] Fix | Delete
isc_result_t
[38] Fix | Delete
isc_base32hex_totext(isc_region_t *source, int wordlength,
[39] Fix | Delete
const char *wordbreak, isc_buffer_t *target);
[40] Fix | Delete
isc_result_t
[41] Fix | Delete
isc_base32hexnp_totext(isc_region_t *source, int wordlength,
[42] Fix | Delete
const char *wordbreak, isc_buffer_t *target);
[43] Fix | Delete
/*!<
[44] Fix | Delete
* \brief Convert data into base32 encoded text.
[45] Fix | Delete
*
[46] Fix | Delete
* Notes:
[47] Fix | Delete
*\li The base32 encoded text in 'target' will be divided into
[48] Fix | Delete
* words of at most 'wordlength' characters, separated by
[49] Fix | Delete
* the 'wordbreak' string. No parentheses will surround
[50] Fix | Delete
* the text.
[51] Fix | Delete
*
[52] Fix | Delete
* Requires:
[53] Fix | Delete
*\li 'source' is a region containing binary data
[54] Fix | Delete
*\li 'target' is a text buffer containing available space
[55] Fix | Delete
*\li 'wordbreak' points to a null-terminated string of
[56] Fix | Delete
* zero or more whitespace characters
[57] Fix | Delete
*
[58] Fix | Delete
* Ensures:
[59] Fix | Delete
*\li target will contain the base32 encoded version of the data
[60] Fix | Delete
* in source. The 'used' pointer in target will be advanced as
[61] Fix | Delete
* necessary.
[62] Fix | Delete
*/
[63] Fix | Delete
[64] Fix | Delete
isc_result_t
[65] Fix | Delete
isc_base32_decodestring(const char *cstr, isc_buffer_t *target);
[66] Fix | Delete
isc_result_t
[67] Fix | Delete
isc_base32hex_decodestring(const char *cstr, isc_buffer_t *target);
[68] Fix | Delete
isc_result_t
[69] Fix | Delete
isc_base32hexnp_decodestring(const char *cstr, isc_buffer_t *target);
[70] Fix | Delete
/*!<
[71] Fix | Delete
* \brief Decode a null-terminated string in base32, base32hex, or
[72] Fix | Delete
* base32hex non-padded.
[73] Fix | Delete
*
[74] Fix | Delete
* Requires:
[75] Fix | Delete
*\li 'cstr' is non-null.
[76] Fix | Delete
*\li 'target' is a valid buffer.
[77] Fix | Delete
*
[78] Fix | Delete
* Returns:
[79] Fix | Delete
*\li #ISC_R_SUCCESS -- the entire decoded representation of 'cstring'
[80] Fix | Delete
* fit in 'target'.
[81] Fix | Delete
*\li #ISC_R_BADBASE32 -- 'cstr' is not a valid base32 encoding.
[82] Fix | Delete
*
[83] Fix | Delete
* Other error returns are any possible error code from:
[84] Fix | Delete
*\li isc_lex_create(),
[85] Fix | Delete
*\li isc_lex_openbuffer(),
[86] Fix | Delete
*\li isc_base32_tobuffer().
[87] Fix | Delete
*/
[88] Fix | Delete
[89] Fix | Delete
isc_result_t
[90] Fix | Delete
isc_base32_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length);
[91] Fix | Delete
isc_result_t
[92] Fix | Delete
isc_base32hex_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length);
[93] Fix | Delete
isc_result_t
[94] Fix | Delete
isc_base32hexnp_tobuffer(isc_lex_t *lexer, isc_buffer_t *target, int length);
[95] Fix | Delete
/*!<
[96] Fix | Delete
* \brief Convert text encoded in base32, base32hex, or base32hex
[97] Fix | Delete
* non-padded from a lexer context into `target`. If 'length' is
[98] Fix | Delete
* non-negative, it is the expected number of encoded octets to convert.
[99] Fix | Delete
*
[100] Fix | Delete
* If 'length' is -1 then 0 or more encoded octets are expected.
[101] Fix | Delete
* If 'length' is -2 then 1 or more encoded octets are expected.
[102] Fix | Delete
*
[103] Fix | Delete
* Returns:
[104] Fix | Delete
*\li #ISC_R_BADBASE32 -- invalid base32 encoding.
[105] Fix | Delete
*\li #ISC_R_UNEXPECTEDEND: the text does not contain the expected
[106] Fix | Delete
* number of encoded octets.
[107] Fix | Delete
*
[108] Fix | Delete
* Requires:
[109] Fix | Delete
*\li 'lexer' is a valid lexer context
[110] Fix | Delete
*\li 'target' is a buffer containing binary data
[111] Fix | Delete
*\li 'length' is -2, -1, or non-negative
[112] Fix | Delete
*
[113] Fix | Delete
* Ensures:
[114] Fix | Delete
*\li target will contain the data represented by the base32 encoded
[115] Fix | Delete
* string parsed by the lexer. No more than `length` octets will
[116] Fix | Delete
* be read, if `length` is non-negative. The 'used' pointer in
[117] Fix | Delete
* 'target' will be advanced as necessary.
[118] Fix | Delete
*/
[119] Fix | Delete
[120] Fix | Delete
isc_result_t
[121] Fix | Delete
isc_base32_decoderegion(isc_region_t *source, isc_buffer_t *target);
[122] Fix | Delete
isc_result_t
[123] Fix | Delete
isc_base32hex_decoderegion(isc_region_t *source, isc_buffer_t *target);
[124] Fix | Delete
isc_result_t
[125] Fix | Delete
isc_base32hexnp_decoderegion(isc_region_t *source, isc_buffer_t *target);
[126] Fix | Delete
/*!<
[127] Fix | Delete
* \brief Decode a packed (no white space permitted) region in
[128] Fix | Delete
* base32, base32hex or base32hex non-padded.
[129] Fix | Delete
*
[130] Fix | Delete
* Requires:
[131] Fix | Delete
*\li 'source' is a valid region.
[132] Fix | Delete
*\li 'target' is a valid buffer.
[133] Fix | Delete
*
[134] Fix | Delete
* Returns:
[135] Fix | Delete
*\li #ISC_R_SUCCESS -- the entire decoded representation of 'cstring'
[136] Fix | Delete
* fit in 'target'.
[137] Fix | Delete
*\li #ISC_R_BADBASE32 -- 'source' is not a valid base32 encoding.
[138] Fix | Delete
*/
[139] Fix | Delete
[140] Fix | Delete
ISC_LANG_ENDDECLS
[141] Fix | Delete
[142] Fix | Delete
#endif /* ISC_BASE32_H */
[143] Fix | Delete
[144] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function