Skip to content
Snippets Groups Projects
Select Git revision
  • e045f153f93f400307d20d337de74cd69c44daf1
  • master default protected
  • 9.0
  • 8.0
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • nt-tools
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • grubba/wip/sakura/8.0
  • v8.0.2000
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
  • v8.0.1982
  • v8.0.1980
  • v8.0.1978
  • v8.0.1976
  • v8.0.1974
  • v8.0.1972
  • v8.0.1970
  • v8.0.1968
  • v8.0.1966
41 results

Colors.pmod

Blame
  • desCode.h 10.96 KiB
    /* desCode.h
     *
     * $Id$ */
    
    /*	des - fast & portable DES encryption & decryption.
     *	Copyright (C) 1992  Dana L. How
     *	Please see the file `descore.README' for the complete copyright notice.
     */
    
    #include "des.h"
    
    extern const uint32_t des_keymap[];
    extern const uint32_t des_bigmap[];
    
    /* optional customization:
     * the idea here is to alter the code so it will still run correctly
     * on any machine,  but the quickest on the specific machine in mind.
     * note that these silly tweaks can give you a 15%-20% speed improvement
     * on the sparc -- it's probably even more significant on the 68000. */
    
    /* take care of machines with incredibly few registers */
    #if	defined(i386)
    #define	REGISTER		/* only x, y, z will be declared register */
    #else
    #define	REGISTER	register
    #endif	/* i386 */
    
    /* is auto inc/dec faster than 7bit unsigned indexing? */
    #if	defined(vax) || defined(mc68000)
    #define	FIXR		r += 32;
    #define	FIXS		s +=  8;
    #define	PREV(v,o)	*--v
    #define	NEXT(v,o)	*v++
    #else
    #define	FIXR
    #define	FIXS
    #define	PREV(v,o)	v[o]
    #define	NEXT(v,o)	v[o]
    #endif
    
    /* if no machine type, default is indexing, 6 registers and cheap literals */
    #if	!defined(i386) && !defined(vax) && !defined(mc68000) && !defined(sparc)
    #define	vax
    #endif
    
    
    /* handle a compiler which can't reallocate registers */
    /* The BYTE type is used as parameter for the encrypt/decrypt functions.
     * It's pretty bad to have the function prototypes depend on
     * a macro definition that the users of the function doesn't
     * know about. /Niels */
    #if	0			/* didn't feel like deleting */
    #define	SREGFREE	; s = (uint8_t *) D
    #define	DEST		s
    #define	D		m0
    #define	BYTE		uint32_t
    #else
    #define	SREGFREE
    #define	DEST		d
    #define	D		d
    #define	BYTE		uint8_t
    #endif
    
    /* handle constants in the optimal way for 386 & vax */
    /* 386: we declare 3 register variables (see above) and use 3 more variables;
     * vax: we use 6 variables, all declared register;
     * we assume address literals are cheap & unrestricted;
     * we assume immediate constants are cheap & unrestricted. */
    #if	defined(i386) || defined(vax)
    #define	MQ0	 des_bigmap