Added generic Argon2 implementation (conflicts with RandomX).
This commit is contained in:
parent
df58821655
commit
0c25424a3e
53 changed files with 5140 additions and 126 deletions
30
src/3rdparty/argon2/lib/blake2/blake2.h
vendored
Normal file
30
src/3rdparty/argon2/lib/blake2/blake2.h
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef ARGON2_BLAKE2_H
|
||||
#define ARGON2_BLAKE2_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
enum blake2b_constant {
|
||||
BLAKE2B_BLOCKBYTES = 128,
|
||||
BLAKE2B_OUTBYTES = 64,
|
||||
BLAKE2B_KEYBYTES = 64,
|
||||
BLAKE2B_SALTBYTES = 16,
|
||||
BLAKE2B_PERSONALBYTES = 16
|
||||
};
|
||||
|
||||
typedef struct __blake2b_state {
|
||||
uint64_t h[8];
|
||||
uint64_t t[2];
|
||||
uint8_t buf[BLAKE2B_BLOCKBYTES];
|
||||
size_t buflen;
|
||||
} blake2b_state;
|
||||
|
||||
/* Streaming API */
|
||||
void blake2b_init(blake2b_state *S, size_t outlen);
|
||||
void blake2b_update(blake2b_state *S, const void *in, size_t inlen);
|
||||
void blake2b_final(blake2b_state *S, void *out, size_t outlen);
|
||||
|
||||
void blake2b_long(void *out, size_t outlen, const void *in, size_t inlen);
|
||||
|
||||
#endif // ARGON2_BLAKE2_H
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue