Commit b861d199 authored by Niels Möller's avatar Niels Möller
Browse files

Constified.

Rev: src/symmetric/desCode.h:1.3
Rev: src/symmetric/include/des.h:1.3
parent 646d42c3
...@@ -343,11 +343,11 @@ extern UINT32 des_keymap[], des_bigmap[]; ...@@ -343,11 +343,11 @@ extern UINT32 des_keymap[], des_bigmap[];
#define ENCRYPT(NAME, TEMP, LOAD, KEYMAP, SAVE) \ #define ENCRYPT(NAME, TEMP, LOAD, KEYMAP, SAVE) \
\ \
void \ void \
NAME(REGISTER BYTE *D, \ NAME(REGISTER BYTE *D, \
REGISTER UINT32 *r, \ REGISTER UINT32 *r, \
REGISTER UINT8 *s) \ REGISTER const UINT8 *s) \
{ \ { \
register UINT32 x, y, z; \ register UINT32 x, y, z; \
\ \
/* declare temps & load data */ \ /* declare temps & load data */ \
TEMP(LOAD); \ TEMP(LOAD); \
...@@ -379,11 +379,11 @@ NAME(REGISTER BYTE *D, \ ...@@ -379,11 +379,11 @@ NAME(REGISTER BYTE *D, \
#define DECRYPT(NAME, TEMP, LOAD, KEYMAP, SAVE) \ #define DECRYPT(NAME, TEMP, LOAD, KEYMAP, SAVE) \
\ \
void \ void \
NAME(REGISTER BYTE *D, \ NAME(REGISTER BYTE *D, \
REGISTER UINT32 *r, \ REGISTER UINT32 *r, \
REGISTER UINT8 *s) \ REGISTER const UINT8 *s) \
{ \ { \
register UINT32 x, y, z; \ register UINT32 x, y, z; \
\ \
/* declare temps & load data */ \ /* declare temps & load data */ \
TEMP(LOAD); \ TEMP(LOAD); \
......
...@@ -18,9 +18,11 @@ RCSID2(desCore_hRcs, "$Id$"); ...@@ -18,9 +18,11 @@ RCSID2(desCore_hRcs, "$Id$");
#define DES_BLOCKSIZE 8 #define DES_BLOCKSIZE 8
#define DES_EXPANDED_KEYLEN 32 #define DES_EXPANDED_KEYLEN 32
/* FIXME: typedef on arrays is ugly. */
typedef UINT8 DesData[DES_BLOCKSIZE]; typedef UINT8 DesData[DES_BLOCKSIZE];
typedef UINT32 DesKeys[DES_EXPANDED_KEYLEN]; typedef UINT32 DesKeys[DES_EXPANDED_KEYLEN];
typedef void DesFunc(UINT8 *d, UINT32 *r, UINT8 *s);
typedef void DesFunc(UINT8 *d, UINT32 *r, const UINT8 *s);
extern int DesMethod(UINT32 *method, UINT8 *k); extern int DesMethod(UINT32 *method, UINT8 *k);
extern void DesQuickInit(void); extern void DesQuickInit(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment