11be53740541472f892bb50a7a63f24d8f09eb31
[openafs.git] / src / des / make_e.c
1 /*
2  * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
3  *
4  * For copying and distribution information, please see the file
5  * <mit-copyright.h>.
6  *
7  * Part of the MIT Project Athena Kerberos encryption system,
8  * originally written 8/85 by Steve Miller.
9  */
10
11 #include <afsconfig.h>
12 #include <afs/param.h>
13
14
15 #include <mit-cpyright.h>
16 #include <stdio.h>
17 #include "tables.h"
18
19 #include "AFS_component_version_number.c"
20
21 main()
22 {
23     register i;
24
25     /* clear the output */
26     fprintf(stdout, "\n\tL2 = 0; R2 = 0;");
27
28     /* only take bits from R1, put into either L2 or R2 */
29     /* first setup E */
30     fprintf(stdout, "\n/* E operations */\n/* right to left */\n");
31     /* first list mapping from left to left */
32
33     for (i = 0; i <= 31; i++)
34         if (E[i] < 32)
35             fprintf(stdout, "\n\tif (R1 & (1<<%d)) L2 |= 1<<%d;", E[i], i);
36
37     fprintf(stdout, "\n\n/* now from right to right */\n");
38     /*  list mapping from left to right */
39     for (i = 32; i <= 47; i++)
40         if (E[i] < 32)
41             fprintf(stdout, "\n\tif (R1 & (1<<%d)) R2 |= 1<<%d;", E[i],
42                     i - 32);
43
44     fprintf(stdout, "\n");
45 }