9#if defined(BFCODEC_EXPORTS) || defined(bfcodec_EXPORTS)
10#define BFCODEC_API __declspec(dllexport)
11#elif defined(BFCODEC_USE_DLL)
12#define BFCODEC_API __declspec(dllimport)
17#if defined(BFCODEC_EXPORTS) || defined(bfcodec_EXPORTS)
18#define BFCODEC_API __attribute__((visibility("default")))
BFCODEC_API void bfcodec_encrypt(C_BLOWFISH *blf, uint8_t *data, size_t len, const uint8_t iv[8])
Encrypt data in place using CBC with the given 8-byte IV.
Definition bfcodec.c:168
BFCODEC_API C_BLOWFISH * bfcodec_init(void)
Allocate and initialise a Blowfish codec with pi-derived P and S boxes.
Definition bfcodec.c:91
BFCODEC_API void bfcodec_expand_key(C_BLOWFISH *blf, const uint8_t *key, size_t key_len)
Expand key into the codec state (XOR P with key bytes, then expand via encrypt).
Definition bfcodec.c:117
BFCODEC_API void bfcodec_decrypt(C_BLOWFISH *blf, uint8_t *data, size_t len, const uint8_t iv[8])
Decrypt data in place using CBC with the given 8-byte IV.
Definition bfcodec.c:149