diff options
author | Hans Svensson <[email protected]> | 2019-02-04 10:47:25 +0100 |
---|---|---|
committer | Hans Svensson <[email protected]> | 2019-02-04 12:03:56 +0100 |
commit | c106a56a415bcef201bca8c1f1454ab6fe9bdb46 (patch) | |
tree | a05d8edd3caca82a7c92d92dd404919519b157af /lib/crypto/c_src/atoms.h | |
parent | 4bdbb313f621d54038a9c17c6d9895650d539eab (diff) | |
download | otp-c106a56a415bcef201bca8c1f1454ab6fe9bdb46.tar.gz otp-c106a56a415bcef201bca8c1f1454ab6fe9bdb46.tar.bz2 otp-c106a56a415bcef201bca8c1f1454ab6fe9bdb46.zip |
Add hash function BLAKE2 to crypto:hash/hmac
Adds two hash functions blake2b and blake2s (64 bit hash and 32 bit hash
respectively). These are modern and standard hash functions used in
blockchains and encrypted communication protocols (e.g. Noise -
http://www.noiseprotocol.org/). The hash functions are available in
OpenSSL since version 1.1.1.
Also add test cases and mention in documentation.
Diffstat (limited to 'lib/crypto/c_src/atoms.h')
-rw-r--r-- | lib/crypto/c_src/atoms.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/crypto/c_src/atoms.h b/lib/crypto/c_src/atoms.h index 9ddf0131ac..32f5ec856c 100644 --- a/lib/crypto/c_src/atoms.h +++ b/lib/crypto/c_src/atoms.h @@ -113,6 +113,10 @@ extern ERL_NIF_TERM atom_sha3_384; extern ERL_NIF_TERM atom_sha3_512; extern ERL_NIF_TERM atom_md5; extern ERL_NIF_TERM atom_ripemd160; +#ifdef HAVE_BLAKE2 +extern ERL_NIF_TERM atom_blake2b; +extern ERL_NIF_TERM atom_blake2s; +#endif #ifdef HAS_ENGINE_SUPPORT extern ERL_NIF_TERM atom_bad_engine_method; |