/*
* Copyright (C) 2008, 2009, 2011, 2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id$ */
/*
* Copyright (C) 2004 Nominet, Ltd.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND NOMINET DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* RFC 5155 */
#ifndef RDATA_GENERIC_NSEC3_50_C
#define RDATA_GENERIC_NSEC3_50_C
#include <isc/iterated_hash.h>
static inline isc_result_t
unsigned int flags;
unsigned char hashalg;
isc_buffer_t b;
/* Hash. */
ISC_FALSE));
/* Flags. */
ISC_FALSE));
if (flags > 255U)
/* Iterations. */
ISC_FALSE));
/* salt */
ISC_FALSE));
} else {
}
/*
* Next hash a single base32hex word.
*/
ISC_FALSE));
if (isc_buffer_usedlength(&b) > 0xffU)
}
static inline isc_result_t
unsigned int i, j;
unsigned char hash;
unsigned char flags;
/* Hash */
/* Flags */
/* Iterations */
/* Salt */
j = uint8_fromregion(&sr);
if (j != 0) {
} else
/* Next hash */
j = uint8_fromregion(&sr);
/*
* Don't leave a trailing space when there's no typemap present.
*/
return (ISC_R_SUCCESS);
}
static inline isc_result_t
/* hash(1), flags(1), iteration(2), saltlen(1) */
return (ISC_R_SUCCESS);
}
static inline isc_result_t
}
static inline int
}
static inline isc_result_t
}
static inline isc_result_t
return (ISC_R_NOMEMORY);
goto cleanup;
goto cleanup;
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
}
static inline void
return;
}
static inline isc_result_t
return (ISC_R_SUCCESS);
}
static inline isc_result_t
isc_region_t r;
dns_rdata_toregion(rdata, &r);
}
static inline isc_boolean_t
/*
* First label is a base32hex string without padding.
*/
return (ISC_TRUE);
return (ISC_FALSE);
}
static inline isc_boolean_t
return (ISC_TRUE);
}
static inline int
}
#endif /* RDATA_GENERIC_NSEC3_50_C */