Skip to content
Snippets Groups Projects
Commit 07c0ac81 authored by Silke Hofstra's avatar Silke Hofstra
Browse files

pkg: add libb2 (BLAKE2)

parent 1ff94531
No related branches found
No related tags found
No related merge requests found
PKG_NAME = libb2
PKG_URL = https://github.com/BLAKE2/libb2
PKG_VERSION = 60ea749837362c226e8501718f505ab138e5c19d # v0.98
PKG_LICENSE = CC0-1.0
.PHONY: all
all: git-download
"$(MAKE)" -C $(PKG_BUILDDIR)/src \
-f $(RIOTPKG)/libb2/Makefile.$(PKG_NAME)
include $(RIOTBASE)/pkg/pkg.mk
INCLUDES += -I$(PKGDIRBASE)/libb2/src
INCLUDES += -I$(RIOTPKG)/libb2/include
MODULE = libb2
# Compiling for native triggers this warning
CFLAGS += -Wno-unused-function
SRC := blake2s-ref.c \
blake2b-ref.c \
blake2sp.c \
blake2bp.c
include $(RIOTBASE)/Makefile.base
/**
* @defgroup pkg_libb2 BLAKE2 hashing library
* @ingroup pkg
* @brief C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp
*
* # BLAKE2 RIOT package
*
* BLAKE2 is a cryptographic hash function specified in RFC 7693.
* It claims to be faster than MD5, SHA-1, SHA-2, and SHA-3, yet at least as
* secure as the latest standard SHA-3.
*
* BLAKE2 comes in two flavors:
*
* - BLAKE2b (or just BLAKE2) is optimized for 64-bit platforms—including NEON-enabled ARMs—and
* produces digests of any size between 1 and 64 bytes
* - BLAKE2s is optimized for 8- to 32-bit platforms and produces digests of
* any size between 1 and 32 bytes
*
* For more information, see the [BLAKE2 website](https://blake2.net/).
*
* ## Usage
*
* Add it as a package in your application's Makefile:
*
* ```makefile
* USEPKG += libb2
* ```
*
* Include the BLAKE2 header in your code:
*
* ```c
* #include "blake2.h"
* ```
*
* @see https://github.com/BLAKE2/libb2
*/
#ifndef CONFIG_H
#define CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
/* Add no suffix to the functions */
#define SUFFIX
/* Test for a little-endian machine */
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define NATIVE_LITTLE_ENDIAN
#endif
#ifdef __cplusplus
}
#endif
#endif /* CONFIG_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment