1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-09 06:18:07 +00:00
ccminer/neoscrypt/neoscrypt.h
Tanguy Pruvot 15584e4f05 neoscrypt: adapt for visual studio compat
todo: fix SM 3.0 builds
2015-05-03 15:53:02 +02:00

34 lines
857 B
C

#if (__cplusplus)
extern "C" {
#endif
void neoscrypt(unsigned char *output, const unsigned char *input, unsigned int profile);
#if (__cplusplus)
}
#else
#define SCRYPT_BLOCK_SIZE 64
#define SCRYPT_HASH_BLOCK_SIZE 64
#define SCRYPT_HASH_DIGEST_SIZE 32
typedef uint8_t hash_digest[SCRYPT_HASH_DIGEST_SIZE];
#define ROTL32(a,b) (((a) << (b)) | ((a) >> (32 - b)))
#define ROTR32(a,b) (((a) >> (b)) | ((a) << (32 - b)))
#define U8TO32_BE(p) \
(((uint32_t)((p)[0]) << 24) | ((uint32_t)((p)[1]) << 16) | \
((uint32_t)((p)[2]) << 8) | ((uint32_t)((p)[3])))
#define U32TO8_BE(p, v) \
(p)[0] = (uint8_t)((v) >> 24); (p)[1] = (uint8_t)((v) >> 16); \
(p)[2] = (uint8_t)((v) >> 8); (p)[3] = (uint8_t)((v) );
#define U64TO8_BE(p, v) \
U32TO8_BE((p), (uint32_t)((v) >> 32)); \
U32TO8_BE((p) + 4, (uint32_t)((v) ));
#endif