Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
tpruvot
GitHub Repository: tpruvot/cpuminer-multi
Path: blob/linux/scryptjane/scrypt-jane-romix.h
1201 views
1
#if defined(SCRYPT_CHACHA)
2
#include "scrypt-jane-chacha.h"
3
#elif defined(SCRYPT_SALSA)
4
#include "scrypt-jane-salsa.h"
5
#elif defined(SCRYPT_SALSA64)
6
#include "scrypt-jane-salsa64.h"
7
#else
8
#define SCRYPT_MIX_BASE "ERROR"
9
typedef uint32_t scrypt_mix_word_t;
10
#define SCRYPT_WORDTO8_LE U32TO8_LE
11
#define SCRYPT_WORD_ENDIAN_SWAP U32_SWAP
12
#define SCRYPT_BLOCK_BYTES 64
13
#define SCRYPT_BLOCK_WORDS (SCRYPT_BLOCK_BYTES / sizeof(scrypt_mix_word_t))
14
#if !defined(SCRYPT_CHOOSE_COMPILETIME)
15
static void FASTCALL scrypt_ROMix_error(scrypt_mix_word_t *X/*[chunkWords]*/, scrypt_mix_word_t *Y/*[chunkWords]*/, scrypt_mix_word_t *V/*[chunkWords * N]*/, uint32_t N, uint32_t r) {}
16
static scrypt_ROMixfn scrypt_getROMix() { return scrypt_ROMix_error; }
17
#else
18
static void FASTCALL scrypt_ROMix(scrypt_mix_word_t *X, scrypt_mix_word_t *Y, scrypt_mix_word_t *V, uint32_t N, uint32_t r) {}
19
#endif
20
static int scrypt_test_mix() { return 0; }
21
#error must define a mix function!
22
#endif
23
24
#if !defined(SCRYPT_CHOOSE_COMPILETIME)
25
#undef SCRYPT_MIX
26
#define SCRYPT_MIX SCRYPT_MIX_BASE
27
#endif
28
29