1 /* $NetBSD: keygen.h,v 1.3 2019/01/09 16:54:58 christos Exp $ */ 2 3 /* 4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 * 6 * This Source Code Form is subject to the terms of the Mozilla Public 7 * License, v. 2.0. If a copy of the MPL was not distributed with this 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 * 10 * See the COPYRIGHT file distributed with this work for additional 11 * information regarding copyright ownership. 12 */ 13 14 15 #ifndef RNDC_KEYGEN_H 16 #define RNDC_KEYGEN_H 1 17 18 /*! \file */ 19 20 #include <isc/lang.h> 21 22 ISC_LANG_BEGINDECLS 23 24 void generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize, 25 isc_buffer_t *key_txtbuffer); 26 27 void write_key_file(const char *keyfile, const char *user, 28 const char *keyname, isc_buffer_t *secret, 29 dns_secalg_t alg); 30 31 const char *alg_totext(dns_secalg_t alg); 32 dns_secalg_t alg_fromtext(const char *name); 33 int alg_bits(dns_secalg_t alg); 34 35 ISC_LANG_ENDDECLS 36 37 #endif /* RNDC_KEYGEN_H */ 38