nettle/3.9.1

The Nettle and Hogweed low-level cryptographic libraries
Recipe info
GPL-3.0-or-later, GPL-2.0-or-later
2023-12-26

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
nettle/3.9.1

Using nettle

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
nettle/3.9.1
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("nettle/3.9.1")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): nettle
  • CMake target name(s): nettle::nettle
  • hogweed => nettle::hogweed
    libnettle => nettle::libnettle
    
  • pkg-config file name(s): hogweed.pc
  • hogweed => hogweed.pc
    libnettle => nettle.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(nettle REQUIRED)
# ...
target_link_libraries(YOUR_TARGET nettle::nettle)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the nettle homepage listed above:

#include "nettle/aes.h"
#include "nettle/arcfour.h"
#include "nettle/arctwo.h"
#include "nettle/asn1.h"
#include "nettle/balloon.h"
#include "nettle/base16.h"
#include "nettle/base64.h"
#include "nettle/bignum.h"
#include "nettle/blowfish.h"
#include "nettle/buffer.h"
#include "nettle/camellia.h"
#include "nettle/cast128.h"
#include "nettle/cbc.h"
#include "nettle/ccm.h"
#include "nettle/cfb.h"
#include "nettle/chacha-poly1305.h"
#include "nettle/chacha.h"
#include "nettle/cmac.h"
#include "nettle/ctr.h"
#include "nettle/curve25519.h"
#include "nettle/curve448.h"
#include "nettle/des.h"
#include "nettle/dsa-compat.h"
#include "nettle/dsa.h"
#include "nettle/eax.h"
#include "nettle/ecc-curve.h"
#include "nettle/ecc.h"
#include "nettle/ecdsa.h"
#include "nettle/eddsa.h"
#include "nettle/gcm.h"
#include "nettle/gostdsa.h"
#include "nettle/gosthash94.h"
#include "nettle/hkdf.h"
#include "nettle/hmac.h"
#include "nettle/knuth-lfib.h"
#include "nettle/macros.h"
#include "nettle/md2.h"
#include "nettle/md4.h"
#include "nettle/md5-compat.h"
#include "nettle/md5.h"
#include "nettle/memops.h"
#include "nettle/memxor.h"
#include "nettle/nettle-meta.h"
#include "nettle/nettle-types.h"
#include "nettle/nist-keywrap.h"
#include "nettle/ocb.h"
#include "nettle/pbkdf2.h"
#include "nettle/pgp.h"
#include "nettle/pkcs1.h"
#include "nettle/poly1305.h"
#include "nettle/pss-mgf1.h"
#include "nettle/pss.h"
#include "nettle/realloc.h"
#include "nettle/ripemd160.h"
#include "nettle/rsa.h"
#include "nettle/salsa20.h"
#include "nettle/serpent.h"
#include "nettle/sexp.h"
#include "nettle/sha.h"
#include "nettle/sha1.h"
#include "nettle/sha2.h"
#include "nettle/sha3.h"
#include "nettle/siv-cmac.h"
#include "nettle/siv-gcm.h"
#include "nettle/sm3.h"
#include "nettle/sm4.h"
#include "nettle/streebog.h"
#include "nettle/twofish.h"
#include "nettle/umac.h"
#include "nettle/version.h"
#include "nettle/xts.h"
#include "nettle/yarrow.h"