blake2s.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * blake2s.h
8  *
9  ****/
10 
11 #pragma once
12 
13 #include "api.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #define BLAKE2S_MAXHASHSIZE 32
20 #define BLAKE2S_MAXKEYSIZE 32
21 #define BLAKE2S_STATESIZE 32
22 #define BLAKE2S_BLOCKSIZE 64
23 
24 typedef struct {
25  uint32_t state[8];
26  uint64_t count;
27  uint8_t buffer[BLAKE2S_BLOCKSIZE];
28  size_t bufferLength;
29  size_t hashSize;
31 
33 void CRYPTO_NAME(blake2s, initkey)(crypto_blake2s_context_t* ctx, size_t hashSize, const void* key, size_t keySize);
36 
37 #ifdef __cplusplus
38 }
39 #endif
void size_t const void * key
Definition: blake2s.h:33
void size_t hashSize
Definition: blake2s.h:33
void CRYPTO_NAME(blake2s, initkey)(crypto_blake2s_context_t *ctx
#define BLAKE2S_BLOCKSIZE
Definition: blake2s.h:22
void size_t const void size_t keySize
Definition: blake2s.h:33
CRYPTO_FUNC_INIT(blake2s)
CRYPTO_FUNC_UPDATE(blake2s)
CRYPTO_FUNC_FINAL(blake2s)
Definition: blake2s.h:24
size_t bufferLength
Definition: blake2s.h:28
size_t hashSize
Definition: blake2s.h:29
uint64_t count
Definition: blake2s.h:26