comparison lib/rijndael-api-fst.c @ 7351:9971c2dc5080

* gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1. * md4.c (md4_process_block): Remove unused variable. * rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests parentheses for clarity.
author Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
date Fri, 22 Sep 2006 16:54:11 +0000
parents 3249ff532a18
children a88f85e4728f
comparison
equal deleted inserted replaced
7350:6c5c8c8b93a3 7351:9971c2dc5080
1 /* rijndael-api-fst.c --- Rijndael cipher implementation. 1 /* rijndael-api-fst.c --- Rijndael cipher implementation.
2 * Copyright (C) 2005 Free Software Foundation, Inc. 2 * Copyright (C) 2005, 2006 Free Software Foundation, Inc.
3 * 3 *
4 * This file is free software; you can redistribute it and/or modify 4 * This file is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published 5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2, or (at your 6 * by the Free Software Foundation; either version 2, or (at your
7 * option) any later version. 7 * option) any later version.
359 size_t inputLen, char *outBuffer) 359 size_t inputLen, char *outBuffer)
360 { 360 {
361 size_t i, k, t, numBlocks; 361 size_t i, k, t, numBlocks;
362 char block[16], *iv; 362 char block[16], *iv;
363 363
364 if (cipher == NULL || 364 if (cipher == NULL
365 key == NULL || 365 || key == NULL
366 cipher->mode != RIJNDAEL_MODE_CFB1 366 || (cipher->mode != RIJNDAEL_MODE_CFB1
367 && key->direction == RIJNDAEL_DIR_ENCRYPT) 367 && key->direction == RIJNDAEL_DIR_ENCRYPT))
368 { 368 {
369 return RIJNDAEL_BAD_CIPHER_STATE; 369 return RIJNDAEL_BAD_CIPHER_STATE;
370 } 370 }
371 if (input == NULL || inputLen <= 0) 371 if (input == NULL || inputLen <= 0)
372 { 372 {