chromium/third_party/unrar/src/blake2s.hpp

// Based on public domain code written in 2012 by Samuel Neves
#ifndef _RAR_BLAKE2_
#define _RAR_BLAKE2_

#define BLAKE2_DIGEST_SIZE
#define BLAKE2_THREADS_NUMBER

constexpr size_t BLAKE2S_BLOCKBYTES =;
constexpr size_t BLAKE2S_OUTBYTES =;


// Alignment to 64 improves performance of both SSE and non-SSE versions.
// Alignment to n*16 is required for SSE version, so we selected 64.
// We use the custom alignment scheme instead of __declspec(align(x)),
// because it is less compiler dependent. Also the compiler directive
// does not help if structure is a member of class allocated through
// 'new' operator.
struct blake2s_state
{};


#ifdef RAR_SMP
class ThreadPool;
#endif

struct blake2sp_state
{};

void blake2sp_init( blake2sp_state *S );
void blake2sp_update( blake2sp_state *S, const byte *in, size_t inlen );
void blake2sp_final( blake2sp_state *S, byte *digest );

#endif