Main Page
Namespaces
Classes
Package Documentation
src
CondCore
CondDB
src
blowfish.h
Go to the documentation of this file.
1
/*
2
* Author : Paul Kocher
3
* E-mail : pck@netcom.com
4
* Date : 1997
5
* Description: C implementation of the Blowfish algorithm.
6
*/
7
8
9
#define INCLUDE_BLOWFISH_DEFINE_H
10
11
struct
BCoptions
{
12
unsigned
char
remove
;
13
unsigned
char
standardout
;
14
unsigned
char
compression
;
15
unsigned
char
type
;
16
unsigned
long
origsize
;
17
unsigned
char
securedelete
;
18
};
19
20
#define ENCRYPT 0
21
#define DECRYPT 1
22
23
#define endianBig ((unsigned char) 0x45)
24
#define endianLittle ((unsigned char) 0x54)
25
26
typedef
unsigned
int
uInt32
;
27
28
#ifdef WIN32
/* Win32 doesn't have random() or lstat */
29
#define random() rand()
30
#define initstate(x,y,z) srand(x)
31
#define lstat(x,y) stat(x,y)
32
#endif
33
34
#ifndef S_ISREG
35
#define S_ISREG(x) ( ((x)&S_IFMT)==S_IFREG )
36
#endif
37
38
#define MAXKEYBYTES 56
/* 448 bits */
39
40
struct
BLOWFISH_CTX
{
41
uInt32
P
[16 + 2];
42
uInt32
S
[4][256];
43
};
44
45
void
Blowfish_Init
(
BLOWFISH_CTX
*ctx,
unsigned
char
*
key
,
int
keyLen);
46
47
void
Blowfish_Encrypt
(
BLOWFISH_CTX
*ctx,
uInt32
*xl,
uInt32
48
*xr);
49
50
void
Blowfish_Decrypt
(
BLOWFISH_CTX
*ctx,
uInt32
*xl,
uInt32
51
*xr);
Blowfish_Init
void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen)
Definition:
blowfish.cc:355
BCoptions::standardout
unsigned char standardout
Definition:
blowfish.h:13
uInt32
unsigned int uInt32
Definition:
blowfish.h:26
BCoptions::origsize
unsigned long origsize
Definition:
blowfish.h:16
crabWrapper.key
key
Definition:
crabWrapper.py:17
BCoptions::type
unsigned char type
Definition:
blowfish.h:15
Blowfish_Decrypt
void Blowfish_Decrypt(BLOWFISH_CTX *ctx, uInt32 *xl, uInt32 *xr)
Definition:
blowfish.cc:326
P
std::pair< OmniClusterRef, TrackingParticleRef > P
Definition:
BDHadronTrackMonitoringAnalyzer.cc:108
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition:
Particle.cc:99
BCoptions::compression
unsigned char compression
Definition:
blowfish.h:14
Blowfish_Encrypt
void Blowfish_Encrypt(BLOWFISH_CTX *ctx, uInt32 *xl, uInt32 *xr)
Definition:
blowfish.cc:299
BLOWFISH_CTX
Definition:
blowfish.h:40
BCoptions::securedelete
unsigned char securedelete
Definition:
blowfish.h:17
BCoptions
Definition:
blowfish.h:11
Generated for CMSSW Reference Manual by
1.8.11