--- /dev/null
+#ifndef DIAGD3DES_H\r
+#define DIAGD3DES_H\r
+\r
+/* D3DES \r
+ *\r
+ * A portable, public domain, version of the Data Encryption Standard.\r
+ *\r
+ * Copyright (c) 2004 by Hisense Incorporated. All Rights Reserved.\r
+ */\r
+\r
+#define EN0 0 /* MODE == encrypt */\r
+#define DE1 1 /* MODE == decrypt */\r
+\r
+/* A useful alias on 68000-ish machines, but NOT USED HERE. */\r
+\r
+typedef union {\r
+ unsigned long blok[2];\r
+ unsigned short word[4];\r
+ unsigned char byte[8];\r
+ } M68K;\r
+\r
+extern void diag_deskey(unsigned char *, short);\r
+/* hexkey[8] MODE\r
+ * Sets the internal key register according to the hexadecimal\r
+ * key contained in the 8 bytes of hexkey, according to the DES,\r
+ * for encryption or decryption according to MODE.\r
+ */\r
+\r
+extern void diag_usekey(unsigned long *);\r
+/* cookedkey[32]\r
+ * Loads the internal key register with the data in cookedkey.\r
+ */\r
+\r
+extern void diag_cpkey(unsigned long *);\r
+/* cookedkey[32]\r
+ * Copies the contents of the internal key register into the storage\r
+ * located at &cookedkey[0].\r
+ */\r
+\r
+extern void diag_des(unsigned char *, unsigned char *);\r
+/* from[8] to[8]\r
+ * Encrypts/Decrypts (according to the key currently loaded in the\r
+ * internal key register) one block of eight bytes at address 'from'\r
+ * into the block at address 'to'. They can be the same.\r
+ */\r
+\r
+#endif\r
+\r
+\r