1 /* $NetBSD: keygen.h,v 1.7 2024/02/21 22:51:00 christos Exp $ */ 2 3 /* 4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 * 6 * SPDX-License-Identifier: MPL-2.0 7 * 8 * This Source Code Form is subject to the terms of the Mozilla Public 9 * License, v. 2.0. If a copy of the MPL was not distributed with this 10 * file, you can obtain one at https://mozilla.org/MPL/2.0/. 11 * 12 * See the COPYRIGHT file distributed with this work for additional 13 * information regarding copyright ownership. 14 */ 15 16 #pragma once 17 18 /*! \file */ 19 20 #include <isc/buffer.h> 21 #include <isc/lang.h> 22 #include <isc/mem.h> 23 24 #include <dns/secalg.h> 25 26 ISC_LANG_BEGINDECLS 27 28 void 29 generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize, 30 isc_buffer_t *key_txtbuffer); 31 32 void 33 write_key_file(const char *keyfile, const char *user, const char *keyname, 34 isc_buffer_t *secret, dns_secalg_t alg); 35 36 const char * 37 alg_totext(dns_secalg_t alg); 38 dns_secalg_t 39 alg_fromtext(const char *name); 40 int 41 alg_bits(dns_secalg_t alg); 42 43 ISC_LANG_ENDDECLS 44