The SWORD Project
1.9.0.svnversion
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
swcipher.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* swcipher.h - class SWCipher: used for data cipher/decipher
4
*
5
* $Id: swcipher.h 3786 2020-08-30 11:35:14Z scribe $
6
*
7
* Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
8
* CrossWire Bible Society
9
* P. O. Box 2528
10
* Tempe, AZ 85280-2528
11
*
12
* This program is free software; you can redistribute it and/or modify it
13
* under the terms of the GNU General Public License as published by the
14
* Free Software Foundation version 2.
15
*
16
* This program is distributed in the hope that it will be useful, but
17
* WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* General Public License for more details.
20
*
21
*/
22
23
#ifndef SWCIPHER_H
24
#define SWCIPHER_H
25
26
#include <
sapphire.h
>
27
28
#include <
defs.h
>
29
#include <
swbuf.h
>
30
31
SWORD_NAMESPACE_START
32
33
class
SWDLLEXPORT
SWCipher
{
34
35
private
:
36
Sapphire
master
;
37
Sapphire
work
;
38
39
char
*
buf
;
40
bool
cipher
;
41
unsigned
long
len
;
42
43
protected
:
44
45
public
:
46
SWCipher
(
unsigned
char
*key);
47
virtual
void
setCipherKey(
const
char
*key);
48
virtual
~
SWCipher
();
49
virtual
void
setUncipheredBuf(
const
char
*buf = 0,
unsigned
long
len = 0);
50
virtual
char
*getUncipheredBuf();
51
virtual
void
setCipheredBuf(
unsigned
long
*len,
const
char
*buf = 0);
52
virtual
char
*getCipheredBuf(
unsigned
long
*len = 0);
53
virtual
void
encode(
void
);
54
virtual
void
decode(
void
);
55
static
SWBuf
personalize(
const
SWBuf
&buf,
bool
encode);
56
};
57
58
SWORD_NAMESPACE_END
59
#endif
SWCipher::work
Sapphire work
Definition:
swcipher.h:37
SWORD_NAMESPACE_START
#define SWORD_NAMESPACE_START
Definition:
defs.h:39
SWCipher::master
Sapphire master
Definition:
swcipher.h:36
SWBuf
Definition:
swbuf.h:47
SWDLLEXPORT
#define SWDLLEXPORT
Definition:
defs.h:171
defs.h
SWCipher::buf
char * buf
Definition:
swcipher.h:39
swbuf.h
SWCipher::cipher
bool cipher
Definition:
swcipher.h:40
SWCipher
Definition:
swcipher.h:33
SWCipher::len
unsigned long len
Definition:
swcipher.h:41
Sapphire
Definition:
sapphire.h:49
sapphire.h
SWORD_NAMESPACE_END
#define SWORD_NAMESPACE_END
Definition:
defs.h:40
include
swcipher.h
Generated by
1.8.5