mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-20 06:08:37 +02:00
Co-authored-by: psychocrypt <psychocryptHPC@gmail.com> Co-authored-by: fireice-uk <fireice-uk@users.noreply.github.com> Co-authored-by: Lee Clagett <code@leeclagett.com> Co-authored-by: curie-kief <curie-kief@users.noreply.github.com>
30 lines
646 B
C
30 lines
646 B
C
#ifndef __CRYPTONIGHT_H_INCLUDED
|
|
#define __CRYPTONIGHT_H_INCLUDED
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stddef.h>
|
|
#include <inttypes.h>
|
|
|
|
typedef struct {
|
|
uint8_t hash_state[224]; // Need only 200, explicit align
|
|
uint8_t* long_state;
|
|
uint8_t ctx_info[24]; //Use some of the extra memory for flags
|
|
} cryptonight_ctx;
|
|
|
|
typedef struct {
|
|
const char* warning;
|
|
} alloc_msg;
|
|
|
|
size_t cryptonight_init(size_t use_fast_mem, size_t use_mlock, alloc_msg* msg);
|
|
cryptonight_ctx* cryptonight_alloc_ctx(size_t use_fast_mem, size_t use_mlock, alloc_msg* msg);
|
|
void cryptonight_free_ctx(cryptonight_ctx* ctx);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|