WvStreams
Main Page
Modules
Classes
Files
File List
File Members
include
wvxor.h
1
/* -*- Mode: C++ -*-
2
* Worldvisions Tunnel Vision Software:
3
* Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4
*
5
* XOR cryptography abstractions.
6
* Could use this to implement short one time pads.
7
*/
8
#ifndef __WVXOR_H
9
#define __WVXOR_H
10
11
#include "wvencoder.h"
12
#include "wvencoderstream.h"
13
18
class
WvXOREncoder
:
public
WvEncoder
19
{
20
public
:
26
WvXOREncoder
(
const
void
*_key,
size_t
_keylen);
27
virtual
~
WvXOREncoder
();
28
29
protected
:
30
bool
_encode
(
WvBuf
&in,
WvBuf
&out,
bool
flush
);
31
32
private
:
33
unsigned
char
*key;
34
size_t
keylen;
35
int
keyoff;
36
};
37
38
43
class
WvXORStream
:
public
WvEncoderStream
44
{
45
public
:
46
WvXORStream
(
WvStream
*_cloned,
const
void
*key,
size_t
_keysize);
47
virtual
~
WvXORStream
() { }
48
public
:
49
const
char
*wstype()
const
{
return
"WvXORStream"
; }
50
};
51
52
#endif
Generated on Wed Aug 28 2019 23:57:14 for WvStreams by
1.8.3.1