projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoupdate
[gnulib.git]
/
lib
/
des.c
diff --git
a/lib/des.c
b/lib/des.c
index
1e128c5
..
3b171a7
100644
(file)
--- a/
lib/des.c
+++ b/
lib/des.c
@@
-1,5
+1,5
@@
/* des.c --- DES and Triple-DES encryption/decryption Algorithm
/* des.c --- DES and Triple-DES encryption/decryption Algorithm
- * Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005
+ * Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005
, 2006
* Free Software Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify
* Free Software Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify
@@
-94,9
+94,7
@@
*/
*/
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "des.h"
#include "des.h"
@@
-420,7
+418,7
@@
des_is_weak_key (const char * key)
right = (data[4] << 24) | (data[5] << 16) | (data[6] << 8) | data[7];
#define WRITE_64BIT_DATA(data, left, right) \
right = (data[4] << 24) | (data[5] << 16) | (data[6] << 8) | data[7];
#define WRITE_64BIT_DATA(data, left, right) \
- data[0] = (left >> 24) &0xff; data[1] = (left >> 16) &0xff; \
+ data[0] = (left >> 24) &0xff; data[1] = (left >> 16) &0xff; \
data[2] = (left >> 8) &0xff; data[3] = left &0xff; \
data[4] = (right >> 24) &0xff; data[5] = (right >> 16) &0xff; \
data[6] = (right >> 8) &0xff; data[7] = right &0xff;
data[2] = (left >> 8) &0xff; data[3] = left &0xff; \
data[4] = (right >> 24) &0xff; data[5] = (right >> 16) &0xff; \
data[6] = (right >> 8) &0xff; data[7] = right &0xff;
@@
-447,7
+445,7
@@
des_is_weak_key (const char * key)
static void
des_key_schedule (const char * _rawkey, uint32_t * subkey)
{
static void
des_key_schedule (const char * _rawkey, uint32_t * subkey)
{
- const unsigned char *rawkey = _rawkey;
+ const unsigned char *rawkey =
(const unsigned char *)
_rawkey;
uint32_t left, right, work;
int round;
uint32_t left, right, work;
int round;
@@
-559,8
+557,8
@@
des_makekey (des_ctx *ctx, const char * key, size_t keylen)
void
des_ecb_crypt (des_ctx *ctx, const char * _from, char * _to, int mode)
{
void
des_ecb_crypt (des_ctx *ctx, const char * _from, char * _to, int mode)
{
- const unsigned char *from = _from;
- unsigned char *to = _to;
+ const unsigned char *from =
(const unsigned char *)
_from;
+ unsigned char *to =
(unsigned char *)
_to;
uint32_t left, right, work;
uint32_t *keys;
uint32_t left, right, work;
uint32_t *keys;
@@
-632,8
+630,8
@@
tripledes_ecb_crypt (tripledes_ctx *ctx,
const char * _from,
char * _to, int mode)
{
const char * _from,
char * _to, int mode)
{
- const unsigned char *from = _from;
- unsigned char *to = _to;
+ const unsigned char *from =
(const unsigned char *)
_from;
+ unsigned char *to =
(unsigned char *)
_to;
uint32_t left, right, work;
uint32_t *keys;
uint32_t left, right, work;
uint32_t *keys;