351b62535d4c4f89883bfdba025999dd32490266Evan Hunt/*
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt *
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt */
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
754cb8a2b33fa6cfaa15d6470f66e5fb0eab4764Automatic Updater/* $Id: keygen.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt#ifndef RNDC_KEYGEN_H
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt#define RNDC_KEYGEN_H 1
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt/*! \file */
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt#include <isc/lang.h>
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntISC_LANG_BEGINDECLS
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan Huntvoid generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
754cb8a2b33fa6cfaa15d6470f66e5fb0eab4764Automatic Updater int keysize, isc_buffer_t *key_txtbuffer);
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan Huntvoid write_key_file(const char *keyfile, const char *user,
754cb8a2b33fa6cfaa15d6470f66e5fb0eab4764Automatic Updater const char *keyname, isc_buffer_t *secret,
754cb8a2b33fa6cfaa15d6470f66e5fb0eab4764Automatic Updater dns_secalg_t alg);
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan Huntconst char *alg_totext(dns_secalg_t alg);
351b62535d4c4f89883bfdba025999dd32490266Evan Huntdns_secalg_t alg_fromtext(const char *name);
351b62535d4c4f89883bfdba025999dd32490266Evan Huntint alg_bits(dns_secalg_t alg);
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntISC_LANG_ENDDECLS
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt#endif /* RNDC_KEYGEN_H */