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
void setcounter(const void *counter, size_t countersize)
Sets the Counter mode auto-incrementing counter.
void getcounter(void *counter) const
Stores the current counter in the supplied buffer.
WvCounterModeEncoder(WvEncoder *_keycrypt, const void *_counter, size_t _countersize)
Create a new counter mode encoder / decoder.
A counter mode encryption encoder.
virtual void incrcounter()
Increments the counter.
Specialization of WvBufBase for unsigned char type buffers intended for use with raw memory buffers.
size_t getcountersize() const
Returns the counter size.
The const in place raw memory buffer type.
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().