From ca68bb3689adff9b10e18662c064381ae9290856 Mon Sep 17 00:00:00 2001 From: Michael Hamburg Date: Thu, 7 Jan 2016 17:30:13 -0800 Subject: [PATCH] autogenerate decaf/crypto.h --- src/gen_headers/main.py | 16 ++++++++++++++++ src/public_include/decaf/crypto.h | 21 --------------------- 2 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 src/public_include/decaf/crypto.h diff --git a/src/gen_headers/main.py b/src/gen_headers/main.py index edeffcd..e407d16 100644 --- a/src/gen_headers/main.py +++ b/src/gen_headers/main.py @@ -26,6 +26,22 @@ decaf_root_hxx = gen_file( code = "\n"+root_hxx_code+"\n" ) +crypto_h_code = "\n".join(( + "#include <%s>" % name + for name in sorted(gend_files) + if re.match("^decaf/crypto_\d+.h$",name) +)) +crypto_h = gen_file( + name = "decaf/crypto.h", + doc = """@brief + @brief Example Decaf cyrpto routines, metaheader. + @warning These are merely examples, though they ought to be secure. But real + protocols will decide differently on magic numbers, formats, which items to + hash, etc. + """, + code = "\n"+crypto_h_code+"\n" +) + root_h_code = "\n".join(( "#include <%s>" % name for name in sorted(gend_files) diff --git a/src/public_include/decaf/crypto.h b/src/public_include/decaf/crypto.h deleted file mode 100644 index bb6af0e..0000000 --- a/src/public_include/decaf/crypto.h +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @file decaf/crypto.h - * @copyright - * Copyright (c) 2016 Cryptography Research, Inc. \n - * Released under the MIT License. See LICENSE.txt for license information. - * @author Mike Hamburg - * @brief Example Decaf cyrpto routines, metaheader. - * @warning These are merely examples, though they ought to be secure. But real - * protocols will decide differently on magic numbers, formats, which items to - * hash, etc. - * @todo TODO remove/autogenerate all these headers. - */ - -#ifndef __DECAF_CRYPTO_H__ -#define __DECAF_CRYPTO_H__ 1 - -#include -#include - -#endif /* __DECAF_CRYPTO_H__ */ -