10 #include "wvencoder.h"
11 #include "wvencoderstream.h"
48 void setkey(
const void *key,
size_t keysize);
55 void setiv(
const void *iv);
70 struct bf_key_st *bfkey;
71 unsigned char ivec[8];
91 const void *key,
size_t _keysize,
97 #endif // __WVBLOWFISH_H
WvEncoderStream chains a series of encoders on the input and output ports of the underlying stream to...
virtual bool _encode(WvBuf &in, WvBuf &out, bool flush)
Template method implementation of encode().
void setkey(const void *key, size_t keysize)
Sets the current Blowfish key and resets the initialization vector to all nulls.
An encoder implementing the Blowfish encryption method.
bool is_encrypting() const
Return true if mode is encrypting or false if decrypting.
virtual bool _reset()
Template method implementation of reset().
void setiv(const void *iv)
Sets the current Blowfish initialization vector.
WvBlowfishEncoder(Mode mode, const void *key, size_t keysize)
Creates a new Blowfish cipher encoder.
Specialization of WvBufBase for unsigned char type buffers intended for use with raw memory buffers.
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
bool flush(WvBuf &inbuf, WvBuf &outbuf, bool finish=false)
Flushes the encoder and optionally finishes it.
A crypto stream implementing Blowfish encryption.