X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..e470c81abda3653a5ef2e3cff7b610aa823fe9b4:/stglibs/crypto.lib/blowfish.h diff --git a/stglibs/crypto.lib/blowfish.h b/stglibs/crypto.lib/blowfish.h index e0cf2068..a8800d75 100644 --- a/stglibs/crypto.lib/blowfish.h +++ b/stglibs/crypto.lib/blowfish.h @@ -8,10 +8,14 @@ #ifndef BLOWFISH_H #define BLOWFISH_H -#include "os_int.h" +#include "stg/os_int.h" #define MAXKEYBYTES 56 /* 448 bits */ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { uint32_t P[16 + 2]; uint32_t S[4][256]; @@ -21,9 +25,13 @@ void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen); void Blowfish_Encrypt(BLOWFISH_CTX *ctx, uint32_t *xl, uint32_t *xr); void Blowfish_Decrypt(BLOWFISH_CTX *ctx, uint32_t *xl, uint32_t *xr); -void EnDecodeInit(const char * key, int passwdLen, BLOWFISH_CTX *ctx); +void EnDecodeInit(const char * key, size_t length, BLOWFISH_CTX *ctx); void DecodeString(char * d, const char * s, BLOWFISH_CTX *ctx); void EncodeString(char * d, const char * s, BLOWFISH_CTX *ctx); +#ifdef __cplusplus +} +#endif + #endif