diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2007-03-15 22:58:36 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2007-03-15 22:58:36 +0000 |
commit | eee009073c7e98c56ad5d8b8f9a7e583e7460012 (patch) | |
tree | 1b4d34d075f88bc7378b49b86766241879e66157 /lib/des.h | |
parent | 02489b329f4a273a8bc43c11f37e277196d64dd8 (diff) | |
download | gnulib-eee009073c7e98c56ad5d8b8f9a7e583e7460012.tar.gz |
* lib/quotearg.c: Include <wctype.h> early, before the definition of
the iswprint macro. Needed on Solaris 2.5.1.
2007-03-12 Bruno Haible <bruno@clisp.org>
* tests/test-printf-frexp.c (main): Declare x as volatile.
2007-03-12 Simon Josefsson <simon@josefsson.org>
* doc/gnulib.texi (Build robot for gnulib): New section.
2007-03-12 Jim Meyering <jim@meyering.net>
* build-aux/bootstrap: New file.
* build-aux/bootstrap.conf: New file, from coreutils.
2007-03-11 Bruno Haible <bruno@clisp.org>
* m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
2007-03-12 Simon Josefsson <simon@josefsson.org>
* lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
avoid collisions with 'des_setkey'. Reported by Bruno Haible
<bruno@clisp.org>. Also change 'tripledes_' to '3des_'.
2007-03-11 Bruno Haible <bruno@clisp.org>
* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
2007-03-11 Bruno Haible <bruno@clisp.org>
* lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
formula. Needed for SunPRO C 5.0.
Diffstat (limited to 'lib/des.h')
-rw-r--r-- | lib/des.h | 43 |
1 files changed, 25 insertions, 18 deletions
@@ -1,5 +1,5 @@ /* des.h --- DES cipher implementation. - * Copyright (C) 2005 Free Software Foundation, Inc. + * Copyright (C) 2005, 2007 Free Software Foundation, Inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published @@ -34,7 +34,7 @@ typedef struct { uint32_t encrypt_subkeys[32]; uint32_t decrypt_subkeys[32]; -} des_ctx; +} gl_des_ctx; /* * Encryption/Decryption context of Triple-DES @@ -43,12 +43,12 @@ typedef struct { uint32_t encrypt_subkeys[96]; uint32_t decrypt_subkeys[96]; -} tripledes_ctx; +} gl_3des_ctx; /* Check whether the 8 byte key is weak. Does not check the parity * bits of the key but simple ignore them. */ extern bool -des_is_weak_key (const char * key); +gl_des_is_weak_key (const char * key); /* * DES @@ -59,21 +59,21 @@ des_is_weak_key (const char * key); * Does not check parity bits, but simply ignore them. Does not check * for weak keys. */ extern void -des_setkey (des_ctx *ctx, const char * key); +gl_des_setkey (gl_des_ctx *ctx, const char * key); /* Fill a DES context CTX with subkeys calculated from 64bit KEY, with * weak key checking. Does not check parity bits, but simply ignore * them. */ extern bool -des_makekey (des_ctx *ctx, const char * key, size_t keylen); +gl_des_makekey (gl_des_ctx *ctx, const char * key, size_t keylen); /* Electronic Codebook Mode DES encryption/decryption of data * according to 'mode'. */ extern void -des_ecb_crypt (des_ctx *ctx, const char * from, char * to, int mode); +gl_des_ecb_crypt (gl_des_ctx *ctx, const char * from, char * to, int mode); -#define des_ecb_encrypt(ctx, from, to) des_ecb_crypt(ctx, from, to, 0) -#define des_ecb_decrypt(ctx, from, to) des_ecb_crypt(ctx, from, to, 1) +#define gl_des_ecb_encrypt(ctx, from, to) gl_des_ecb_crypt(ctx, from, to, 0) +#define gl_des_ecb_decrypt(ctx, from, to) gl_des_ecb_crypt(ctx, from, to, 1) /* Triple-DES * ---------- @@ -83,7 +83,9 @@ des_ecb_crypt (des_ctx *ctx, const char * from, char * to, int mode); * 64bit keys in KEY1 and KEY2. Does not check the parity bits of the * keys, but simply ignore them. Does not check for weak keys. */ extern void -tripledes_set2keys (tripledes_ctx *ctx, const char * key1, const char * key2); +gl_3des_set2keys (gl_3des_ctx *ctx, + const char * key1, + const char * key2); /* * Fill a Triple-DES context CTX with subkeys calculated from three @@ -91,24 +93,29 @@ tripledes_set2keys (tripledes_ctx *ctx, const char * key1, const char * key2); * of the keys, but simply ignore them. Does not check for weak * keys. */ extern void -tripledes_set3keys (tripledes_ctx *ctx, const char * key1, - const char * key2, const char * key3); +gl_3des_set3keys (gl_3des_ctx *ctx, + const char * key1, + const char * key2, + const char * key3); /* Fill a Triple-DES context CTX with subkeys calculated from three * concatenated 64bit keys in KEY, with weak key checking. Does not * check the parity bits of the keys, but simply ignore them. */ extern bool -tripledes_makekey (tripledes_ctx *ctx, const char * key, size_t keylen); +gl_3des_makekey (gl_3des_ctx *ctx, + const char * key, + size_t keylen); /* Electronic Codebook Mode Triple-DES encryption/decryption of data * according to 'mode'. Sometimes this mode is named 'EDE' mode * (Encryption-Decryption-Encryption). */ extern void -tripledes_ecb_crypt (tripledes_ctx *ctx, - const char * from, - char * to, int mode); +gl_3des_ecb_crypt (gl_3des_ctx *ctx, + const char * from, + char * to, + int mode); -#define tripledes_ecb_encrypt(ctx, from, to) tripledes_ecb_crypt(ctx,from,to,0) -#define tripledes_ecb_decrypt(ctx, from, to) tripledes_ecb_crypt(ctx,from,to,1) +#define gl_3des_ecb_encrypt(ctx, from, to) gl_3des_ecb_crypt(ctx,from,to,0) +#define gl_3des_ecb_decrypt(ctx, from, to) gl_3des_ecb_crypt(ctx,from,to,1) #endif /* DES_H */ |