Lines Matching refs:BLAKE2S_BLOCKBYTES
256 uint8_t block[BLAKE2S_BLOCKBYTES]; in blake2s_init_key()
257 memset( block, 0, BLAKE2S_BLOCKBYTES ); in blake2s_init_key()
259 blake2s_update( S, block, BLAKE2S_BLOCKBYTES ); in blake2s_init_key()
260 secure_zero_memory( block, BLAKE2S_BLOCKBYTES ); /* Burn the key from stack */ in blake2s_init_key()
266 static inline int blake2s_compress( blake2s_state *S, const uint8_t block[BLAKE2S_BLOCKBYTES] ) in blake2s_compress() argument
329 size_t fill = 2 * BLAKE2S_BLOCKBYTES - left; in blake2s_update()
335 blake2s_increment_counter( S, BLAKE2S_BLOCKBYTES ); in blake2s_update()
337 memcpy( S->buf, S->buf + BLAKE2S_BLOCKBYTES, BLAKE2S_BLOCKBYTES ); // Shift buffer left in blake2s_update()
338 S->buflen -= BLAKE2S_BLOCKBYTES; in blake2s_update()
361 if( S->buflen > BLAKE2S_BLOCKBYTES ) in blake2s_final()
363 blake2s_increment_counter( S, BLAKE2S_BLOCKBYTES ); in blake2s_final()
365 S->buflen -= BLAKE2S_BLOCKBYTES; in blake2s_final()
366 memmove( S->buf, S->buf + BLAKE2S_BLOCKBYTES, S->buflen ); in blake2s_final()
371 memset( S->buf + S->buflen, 0, 2 * BLAKE2S_BLOCKBYTES - S->buflen ); /* Padding */ in blake2s_final()