/*
* Copyright (C) 2006, 2008, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
*
* 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 ISC 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.
*/
/* $Id$ */
#include <config.h>
#include <stdlib.h>
#include <stdarg.h>
#include <isc/iterated_hash.h>
#include <dns/fixedname.h>
ISC_PLATFORM_NORETURN_PRE static void
static void
exit(1);
}
static void
if (result != ISC_R_SUCCESS)
}
static void
usage() {
fatal("salt hash iterations domain");
}
int
unsigned int hash_alg;
unsigned int length;
unsigned int iterations;
unsigned int salt_length;
if (argc != 5)
usage();
salt_length = 0;
salt[0] = 0;
} else {
if (salt_length > DNS_NSEC3_SALTSIZE)
fatal("salt too long");
}
if (hash_alg > 255U)
fatal("hash algorithm too large");
if (iterations > 0xffffU)
fatal("iterations to large");
if (length == 0)
fatal("isc_iterated_hash failed");
return(0);
}