From c4f3d97262d090ff71781818cb5f32eafd676bf1 Mon Sep 17 00:00:00 2001 From: Loup Vaillant Date: Mon, 25 Apr 2022 22:37:19 +0200 Subject: [PATCH] Document MONOCYPHER_CPP_NAMESPACE --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index b0135d8..9455569 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,12 @@ unrolled loop _slower_ (possibly because of the cost of fetching 5KB of additional code). If you're using an embedded platform, try this option. The binary will be about 5KB smaller, and in some cases faster. +The `MONOCYPHER_CPP_NAMESPACE` preprocessor definition allows C++ users +who compile Monocypher as C++ to wrap it in a namespace. When it is not +defined (the default), we assume Monocypher is compiled as C, and an +`extern "C"` declaration is added when we detect that the header is +included in C++ code. + The `change-prefix.sh` script can rename all functions by replacing "crypto_" by a chosen prefix, so you can avoid name clashes. For instance, the following command changes all instances of "crypto_" by -- 2.47.3