From: Loup Vaillant Date: Mon, 25 Apr 2022 20:37:19 +0000 (+0200) Subject: Document MONOCYPHER_CPP_NAMESPACE X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=c4f3d97262d090ff71781818cb5f32eafd676bf1;p=Monocypher.git Document MONOCYPHER_CPP_NAMESPACE --- 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