6 * A portable, public domain, version of the Data Encryption Standard.
\r
8 * Copyright (c) 2004 by Hisense Incorporated. All Rights Reserved.
\r
11 #define EN0 0 /* MODE == encrypt */
\r
12 #define DE1 1 /* MODE == decrypt */
\r
14 /* A useful alias on 68000-ish machines, but NOT USED HERE. */
\r
17 unsigned long blok[2];
\r
18 unsigned short word[4];
\r
19 unsigned char byte[8];
\r
22 extern void diag_deskey(unsigned char *, short);
\r
24 * Sets the internal key register according to the hexadecimal
\r
25 * key contained in the 8 bytes of hexkey, according to the DES,
\r
26 * for encryption or decryption according to MODE.
\r
29 extern void diag_usekey(unsigned long *);
\r
31 * Loads the internal key register with the data in cookedkey.
\r
34 extern void diag_cpkey(unsigned long *);
\r
36 * Copies the contents of the internal key register into the storage
\r
37 * located at &cookedkey[0].
\r
40 extern void diag_des(unsigned char *, unsigned char *);
\r
42 * Encrypts/Decrypts (according to the key currently loaded in the
\r
43 * internal key register) one block of eight bytes at address 'from'
\r
44 * into the block at address 'to'. They can be the same.
\r