11#include "wvencoderstream.h"
14#include <openssl/des.h>
50 virtual void setkey(
const void *key)
52 setkey(key, (
unsigned char*)key+DES_KEY_SZ,
53 (
unsigned char *)key+(DES_KEY_SZ*2));
56 virtual void setkey(
const void *_key1,
const void *_key2,
64 virtual void setiv(
const void *iv);
74 DES_key_schedule deskey1;
75 DES_key_schedule deskey2;
76 DES_key_schedule deskey3;
94 WvTripleDESStream(
WvStream *_cloned,
const void *_key1,
95 const void *_key2,
const void *_key3,
98 virtual ~WvTripleDESStream() { }
WvEncoderStream(WvStream *cloned)
Creates an encoder stream.
bool flush(WvBuf &inbuf, WvBuf &outbuf, bool finish=false)
Flushes the encoder and optionally finishes it.
WvStream()
Basic constructor for just a do-nothing WvStream.
An encoder implementing the TripleDES encryption method.
virtual bool _encode(WvBuf &in, WvBuf &out, bool flush)
Template method implementation of encode().
virtual bool _reset()
Template method implementation of reset().