Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / gst / librfb / d3des.h
1 /*
2  * This is D3DES (V5.09) by Richard Outerbridge with the double and
3  * triple-length support removed for use in VNC.
4  *
5  * These changes are:
6  *  Copyright (C) 1999 AT&T Laboratories Cambridge.  All Rights Reserved.
7  *
8  * This software is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  */
12
13 /* d3des.h -
14  *
15  *      Headers and defines for d3des.c
16  *      Graven Imagery, 1992.
17  *
18  * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
19  *      (GEnie : OUTER; CIS : [71755,204])
20  */
21
22 #define EN0     0               /* MODE == encrypt */
23 #define DE1     1               /* MODE == decrypt */
24
25 /* init to 0 */
26 typedef struct {
27   unsigned long KnL[32];
28 } DESContext;
29
30 extern void deskey (DESContext * ctx, unsigned char *, int);
31
32 /*                    hexkey[8]     MODE
33  * Sets the internal key register according to the hexadecimal
34  * key contained in the 8 bytes of hexkey, according to the DES,
35  * for encryption or decryption according to MODE.
36  */
37
38 extern void usekey (DESContext * ctx, unsigned long *);
39
40 /*                  cookedkey[32]
41  * Loads the internal key register with the data in cookedkey.
42  */
43
44 extern void cpkey (DESContext * ctx, unsigned long *);
45
46 /*                 cookedkey[32]
47  * Copies the contents of the internal key register into the storage
48  * located at &cookedkey[0].
49  */
50
51 extern void des (DESContext * ctx, unsigned char *, unsigned char *);
52
53 /*                  from[8]           to[8]
54  * Encrypts/Decrypts (according to the key currently loaded in the
55  * internal key register) one block of eight bytes at address 'from'
56  * into the block at address 'to'.  They can be the same.
57  */
58
59 /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
60  ********************************************************************/