1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #ifndef _BLF_H_
- #define _BLF_H_
- #include "includes.h"
- #if !defined(HAVE_BCRYPT_PBKDF) && !defined(HAVE_BLH_H)
- #define BLF_N 16
- #define BLF_MAXKEYLEN ((BLF_N-2)*4)
- #define BLF_MAXUTILIZED ((BLF_N+2)*4)
- typedef struct BlowfishContext {
- u_int32_t S[4][256];
- u_int32_t P[BLF_N + 2];
- } blf_ctx;
- void Blowfish_encipher(blf_ctx *, u_int32_t *, u_int32_t *);
- void Blowfish_decipher(blf_ctx *, u_int32_t *, u_int32_t *);
- void Blowfish_initstate(blf_ctx *);
- void Blowfish_expand0state(blf_ctx *, const u_int8_t *, u_int16_t);
- void Blowfish_expandstate
- (blf_ctx *, const u_int8_t *, u_int16_t, const u_int8_t *, u_int16_t);
- void blf_key(blf_ctx *, const u_int8_t *, u_int16_t);
- void blf_enc(blf_ctx *, u_int32_t *, u_int16_t);
- void blf_dec(blf_ctx *, u_int32_t *, u_int16_t);
- void blf_ecb_encrypt(blf_ctx *, u_int8_t *, u_int32_t);
- void blf_ecb_decrypt(blf_ctx *, u_int8_t *, u_int32_t);
- void blf_cbc_encrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t);
- void blf_cbc_decrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t);
- u_int32_t Blowfish_stream2word(const u_int8_t *, u_int16_t , u_int16_t *);
- #endif
- #endif
|