X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b3139bf3f37b3b0244efea8b4b5e5a7d0bc90095..be4b0c4a82a46b9f69d4ee403fc397dc197626dc:/stglibs/crypto.lib/include/stg/blowfish.h diff --git a/stglibs/crypto.lib/include/stg/blowfish.h b/stglibs/crypto.lib/include/stg/blowfish.h index c9983340..783a9c30 100644 --- a/stglibs/crypto.lib/include/stg/blowfish.h +++ b/stglibs/crypto.lib/include/stg/blowfish.h @@ -13,10 +13,7 @@ #define MAXKEYBYTES 56 /* 448 bits */ #ifdef __cplusplus -#include // size_t extern "C" { -#else -#include // size_t #endif typedef struct { @@ -24,13 +21,16 @@ typedef struct { uint32_t S[4][256]; } BLOWFISH_CTX; -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 Blowfish_Init(BLOWFISH_CTX * ctx, unsigned char * key, int keyLen); +void Blowfish_Encrypt(const BLOWFISH_CTX * ctx, uint32_t * xl, uint32_t * xr); +void Blowfish_Decrypt(const BLOWFISH_CTX * ctx, uint32_t * xl, uint32_t * xr); -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); +void InitContext(const char * key, size_t length, BLOWFISH_CTX * ctx); +void DecryptBlock(void * d, const void * s, const BLOWFISH_CTX * ctx); +void EncryptBlock(void * d, const void * s, const BLOWFISH_CTX * ctx); + +void DecryptString(void * d, const void * s, size_t length, const BLOWFISH_CTX * ctx); +void EncryptString(void * d, const void * s, size_t length, const BLOWFISH_CTX * ctx); #ifdef __cplusplus }