2020-10-12 19:10:19 +02:00
|
|
|
/******************************************************************************/
|
|
|
|
/* MCrypt, by LoRd_MuldeR <MuldeR2@GMX.de> */
|
|
|
|
/* This work has been released under the CC0 1.0 Universal license! */
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
#ifndef INC_MCYRPT_H
|
|
|
|
#define INC_MCYRPT_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
extern const char *const LIBMCRYPT_VERSION;
|
2020-10-12 23:10:47 +02:00
|
|
|
extern const char* const LIBMCRYPT_BUILDNO;
|
2020-10-12 19:10:19 +02:00
|
|
|
|
|
|
|
typedef uintptr_t mcrypt_t;
|
|
|
|
|
|
|
|
int mcrypt_generate_seed(uint64_t* const seed);
|
|
|
|
|
|
|
|
mcrypt_t mcrypt_init(const uint64_t salt, const char* const passphrase);
|
|
|
|
void mcrypt_free(const mcrypt_t context);
|
|
|
|
|
|
|
|
int mcrypt_enc_process(const mcrypt_t context, const uint8_t* const input, uint8_t* const output, size_t length);
|
|
|
|
int mcrypt_enc_process_inplace(const mcrypt_t context, uint8_t* const buffer, size_t length);
|
|
|
|
|
|
|
|
int mcrypt_dec_process(const mcrypt_t context, const uint8_t* const input, uint8_t* const output, size_t length);
|
|
|
|
int mcrypt_dec_process_inplace(const mcrypt_t context, uint8_t* const buffer, size_t length);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|