fpending: fix regression on DragonFly BSD
[gnulib.git] / lib / rijndael-api-fst.h
index 2e1dfa6..1251d9c 100644 (file)
@@ -1,5 +1,5 @@
 /* rijndael-api-fst.h --- Rijndael cipher implementation.
- * Copyright (C) 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2009-2013 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
@@ -12,9 +12,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this file; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this file; if not, see <http://www.gnu.org/licenses/>.
  *
  */
 
@@ -95,15 +93,15 @@ typedef enum
 
 typedef enum
 {
-  RIJNDAEL_DIR_ENCRYPT = 0,    /*  Are we encrypting?  */
-  RIJNDAEL_DIR_DECRYPT = 1     /*  Are we decrypting?  */
+  RIJNDAEL_DIR_ENCRYPT = 0,     /*  Are we encrypting?  */
+  RIJNDAEL_DIR_DECRYPT = 1      /*  Are we decrypting?  */
 } rijndael_direction;
 
 typedef enum
 {
-  RIJNDAEL_MODE_ECB = 1,       /*  Are we ciphering in ECB mode?   */
-  RIJNDAEL_MODE_CBC = 2,       /*  Are we ciphering in CBC mode?   */
-  RIJNDAEL_MODE_CFB1 = 3       /*  Are we ciphering in 1-bit CFB mode? */
+  RIJNDAEL_MODE_ECB = 1,        /*  Are we ciphering in ECB mode?   */
+  RIJNDAEL_MODE_CBC = 2,        /*  Are we ciphering in CBC mode?   */
+  RIJNDAEL_MODE_CFB1 = 3        /*  Are we ciphering in 1-bit CFB mode? */
 } rijndael_mode;
 
 /*  The structure for key information */
@@ -125,8 +123,8 @@ typedef struct
 
 /*  The structure for cipher information */
 typedef struct
-{                              /* changed order of the components */
-  rijndael_mode mode;          /* MODE_ECB, MODE_CBC, or MODE_CFB1 */
+{                               /* changed order of the components */
+  rijndael_mode mode;           /* MODE_ECB, MODE_CBC, or MODE_CFB1 */
   /* A possible Initialization Vector for ciphering */
   char IV[RIJNDAEL_MAX_IV_SIZE];
 } rijndaelCipherInstance;
@@ -138,7 +136,7 @@ typedef struct
    128, 192 or 256. Returns 0 on success, or an error code. */
 extern rijndael_rc
 rijndaelMakeKey (rijndaelKeyInstance *key, rijndael_direction direction,
-                size_t keyLen, const char *keyMaterial);
+                 size_t keyLen, const char *keyMaterial);
 
 /* Initialize cipher state CIPHER for encryption MODE (e.g.,
    RIJNDAEL_MODE_CBC) with initialization vector IV, a hex string of
@@ -146,7 +144,7 @@ rijndaelMakeKey (rijndaelKeyInstance *key, rijndael_direction direction,
    not need an IV (i.e., RIJNDAEL_MODE_ECB).  */
 extern rijndael_rc
 rijndaelCipherInit (rijndaelCipherInstance *cipher,
-                   rijndael_mode mode, const char *IV);
+                    rijndael_mode mode, const char *IV);
 
 /* Encrypt data in INPUT, of INPUTLEN/8 bytes length, placing the
    output in the pre-allocated OUTBUFFER which must hold at least
@@ -157,9 +155,9 @@ rijndaelCipherInit (rijndaelCipherInstance *cipher,
    negative rijndael_rc error code. */
 extern int
 rijndaelBlockEncrypt (rijndaelCipherInstance *cipher,
-                     const rijndaelKeyInstance *key,
-                     const char *input, size_t inputLen,
-                     char *outBuffer);
+                      const rijndaelKeyInstance *key,
+                      const char *input, size_t inputLen,
+                      char *outBuffer);
 
 /* Encrypt data in INPUT, of INPUTOCTETS bytes length, placing the
    output in the pre-allocated OUTBUFFER which must hold at least
@@ -172,9 +170,9 @@ rijndaelBlockEncrypt (rijndaelCipherInstance *cipher,
    negative rijndael_rc error code. */
 extern int
 rijndaelPadEncrypt (rijndaelCipherInstance *cipher,
-                   const rijndaelKeyInstance *key,
-                   const char *input, size_t inputOctets,
-                   char *outBuffer);
+                    const rijndaelKeyInstance *key,
+                    const char *input, size_t inputOctets,
+                    char *outBuffer);
 
 /* Decrypt data in INPUT, of INPUTLEN/8 bytes length, placing the
    output in the pre-allocated OUTBUFFER which must hold at least
@@ -185,9 +183,9 @@ rijndaelPadEncrypt (rijndaelCipherInstance *cipher,
    negative rijndael_rc error code. */
 extern int
 rijndaelBlockDecrypt (rijndaelCipherInstance *cipher,
-                     const rijndaelKeyInstance *key,
-                     const char *input, size_t inputLen,
-                     char *outBuffer);
+                      const rijndaelKeyInstance *key,
+                      const char *input, size_t inputLen,
+                      char *outBuffer);
 
 /* Decrypt data in INPUT, of INPUTOCTETS bytes length, placing the
    output in the pre-allocated OUTBUFFER which must hold at least
@@ -200,8 +198,8 @@ rijndaelBlockDecrypt (rijndaelCipherInstance *cipher,
    negative rijndael_rc error code. */
 extern int
 rijndaelPadDecrypt (rijndaelCipherInstance *cipher,
-                   const rijndaelKeyInstance *key,
-                   const char *input, size_t inputOctets,
-                   char *outBuffer);
+                    const rijndaelKeyInstance *key,
+                    const char *input, size_t inputOctets,
+                    char *outBuffer);
 
 #endif /* __RIJNDAEL_API_FST_H */