vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h in rbnacl-libsodium-1.0.0 vs vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h in rbnacl-libsodium-1.0.1

- old
+ new

@@ -9,12 +9,12 @@ You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. */ -#ifndef __BLAKE2_H__ -#define __BLAKE2_H__ +#ifndef blake2_H +#define blake2_H #include <stddef.h> #include <stdint.h> #include "crypto_generichash_blake2b.h" @@ -56,11 +56,11 @@ BLAKE2B_SALTBYTES = 16, BLAKE2B_PERSONALBYTES = 16 }; #pragma pack(push, 1) - typedef struct __blake2s_param + typedef struct blake2s_param_ { uint8_t digest_length; // 1 uint8_t key_length; // 2 uint8_t fanout; // 3 uint8_t depth; // 4 @@ -71,21 +71,21 @@ // uint8_t reserved[0]; uint8_t salt[BLAKE2S_SALTBYTES]; // 24 uint8_t personal[BLAKE2S_PERSONALBYTES]; // 32 } blake2s_param; - ALIGN( 64 ) typedef struct __blake2s_state + ALIGN( 64 ) typedef struct blake2s_state_ { uint32_t h[8]; uint32_t t[2]; uint32_t f[2]; uint8_t buf[2 * BLAKE2S_BLOCKBYTES]; size_t buflen; uint8_t last_node; } blake2s_state ; - typedef struct __blake2b_param + typedef struct blake2b_param_ { uint8_t digest_length; // 1 uint8_t key_length; // 2 uint8_t fanout; // 3 uint8_t depth; // 4 @@ -99,29 +99,29 @@ } blake2b_param; #ifndef DEFINE_BLAKE2B_STATE typedef crypto_generichash_blake2b_state blake2b_state; #else - ALIGN( 64 ) typedef struct __blake2b_state + ALIGN( 64 ) typedef struct blake2b_state_ { uint64_t h[8]; uint64_t t[2]; uint64_t f[2]; uint8_t buf[2 * BLAKE2B_BLOCKBYTES]; size_t buflen; uint8_t last_node; } blake2b_state; #endif - typedef struct __blake2sp_state + typedef struct blake2sp_state_ { blake2s_state S[8][1]; blake2s_state R[1]; uint8_t buf[8 * BLAKE2S_BLOCKBYTES]; size_t buflen; } blake2sp_state; - typedef struct __blake2bp_state + typedef struct blake2bp_state_ { blake2b_state S[4][1]; blake2b_state R[1]; uint8_t buf[4 * BLAKE2B_BLOCKBYTES]; size_t buflen;