~ubuntu-branches/ubuntu/warty/openafs/warty

« back to all changes in this revision

Viewing changes to src/des/make_e.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2004-01-10 16:37:33 UTC
  • Revision ID: james.westby@ubuntu.com-20040110163733-jvr0n1uahshlb1uu
Tags: upstream-1.2.11
ImportĀ upstreamĀ versionĀ 1.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
RCSID("$Header: /afs/sipb.mit.edu/project/openafs/debian/cvs/openafs/src/des/make_e.c,v 1.1.1.3 2001/07/14 22:21:33 hartmans Exp $");
 
15
 
 
16
#include <mit-cpyright.h>
 
17
#include <stdio.h>
 
18
#include "tables.h"
 
19
 
 
20
#include "AFS_component_version_number.c"
 
21
 
 
22
main()
 
23
{
 
24
    register i;
 
25
 
 
26
    /* clear the output */
 
27
    fprintf(stdout,"\n\tL2 = 0; R2 = 0;");
 
28
 
 
29
    /* only take bits from R1, put into either L2 or R2 */
 
30
    /* first setup E */
 
31
    fprintf(stdout,"\n/* E operations */\n/* right to left */\n");
 
32
    /* first list mapping from left to left */
 
33
 
 
34
    for (i = 0; i <= 31; i++)
 
35
        if (E[i] < 32)
 
36
            fprintf(stdout,
 
37
                    "\n\tif (R1 & (1<<%d)) L2 |= 1<<%d;",E[i],i);
 
38
 
 
39
    fprintf(stdout,"\n\n/* now from right to right */\n");
 
40
    /*  list mapping from left to right */
 
41
    for (i = 32; i <= 47; i++)
 
42
        if (E[i] <32)
 
43
            fprintf(stdout,
 
44
                    "\n\tif (R1 & (1<<%d)) R2 |= 1<<%d;",E[i],i-32);
 
45
 
 
46
    fprintf(stdout,"\n");
 
47
}