7 #ifndef __WVCOUNTERMODE_H 8 #define __WVCOUNTERMODE_H 10 #include "wvencoder.h" 26 const void *_counter,
size_t _countersize);
34 void setcounter(
const void *counter,
size_t countersize);
44 {
return countersize; }
53 unsigned char *counter;
59 #endif // __WVCOUNTERMODE_H bool flush(WvBuf &inbuf, WvBuf &outbuf, bool finish=false)
Flushes the encoder and optionally finishes it.
virtual bool _encode(WvBuf &inbuf, WvBuf &outbuf, bool flush)
Template method implementation of encode().
The const in place raw memory buffer type.
Specialization of WvBufBase for unsigned char type buffers intended for use with raw memory buffers...
void getcounter(void *counter) const
Stores the current counter in the supplied buffer.
void setcounter(const void *counter, size_t countersize)
Sets the Counter mode auto-incrementing counter.
virtual void incrcounter()
Increments the counter.
size_t getcountersize() const
Returns the counter size.
WvCounterModeEncoder(WvEncoder *_keycrypt, const void *_counter, size_t _countersize)
Create a new counter mode encoder / decoder.
A counter mode encryption encoder.