1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

pgindent run on all C files. Java run to follow. initdb/regression

tests pass.
This commit is contained in:
Bruce Momjian
2001-10-25 05:50:21 +00:00
parent 59da2105d8
commit b81844b173
818 changed files with 21684 additions and 20491 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: blf.h,v 1.3 2001/05/15 02:40:35 deraadt Exp $ */
/* $OpenBSD: blf.h,v 1.3 2001/05/15 02:40:35 deraadt Exp $ */
/*
* Blowfish - a fast block cipher designed by Bruce Schneier
@ -10,15 +10,15 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Niels Provos.
* must display the following acknowledgement:
* This product includes software developed by Niels Provos.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@ -42,14 +42,15 @@
* of the key affect all cipherbits.
*/
#define BLF_N 16 /* Number of Subkeys */
#define BLF_MAXKEYLEN ((BLF_N-2)*4) /* 448 bits */
#define BLF_N 16 /* Number of Subkeys */
#define BLF_MAXKEYLEN ((BLF_N-2)*4) /* 448 bits */
/* Blowfish context */
typedef struct BlowfishContext {
uint32 S[4][256]; /* S-Boxes */
uint32 P[BLF_N + 2]; /* Subkeys */
} blf_ctx;
typedef struct BlowfishContext
{
uint32 S[4][256]; /* S-Boxes */
uint32 P[BLF_N + 2]; /* Subkeys */
} blf_ctx;
/* Raw access to customized Blowfish
* blf_key is just:
@ -57,26 +58,25 @@ typedef struct BlowfishContext {
* Blowfish_expand0state( state, key, keylen )
*/
void Blowfish_encipher (blf_ctx *, uint32 *);
void Blowfish_decipher (blf_ctx *, uint32 *);
void Blowfish_initstate (blf_ctx *);
void Blowfish_expand0state (blf_ctx *, const uint8 *, uint16);
void Blowfish_expandstate
(blf_ctx *, const uint8 *, uint16, const uint8 *, uint16);
void Blowfish_encipher(blf_ctx *, uint32 *);
void Blowfish_decipher(blf_ctx *, uint32 *);
void Blowfish_initstate(blf_ctx *);
void Blowfish_expand0state(blf_ctx *, const uint8 *, uint16);
void Blowfish_expandstate
(blf_ctx *, const uint8 *, uint16, const uint8 *, uint16);
/* Standard Blowfish */
void blf_key (blf_ctx *, const uint8 *, uint16);
void blf_enc (blf_ctx *, uint32 *, uint16);
void blf_dec (blf_ctx *, uint32 *, uint16);
void blf_key(blf_ctx *, const uint8 *, uint16);
void blf_enc(blf_ctx *, uint32 *, uint16);
void blf_dec(blf_ctx *, uint32 *, uint16);
/* Converts uint8 to uint32 */
uint32 Blowfish_stream2word (const uint8 *, uint16, uint16 *);
uint32 Blowfish_stream2word(const uint8 *, uint16, uint16 *);
void blf_ecb_encrypt (blf_ctx *, uint8 *, uint32);
void blf_ecb_decrypt (blf_ctx *, uint8 *, uint32);
void blf_cbc_encrypt (blf_ctx *, uint8 *, uint8 *, uint32);
void blf_cbc_decrypt (blf_ctx *, uint8 *, uint8 *, uint32);
void blf_ecb_encrypt(blf_ctx *, uint8 *, uint32);
void blf_ecb_decrypt(blf_ctx *, uint8 *, uint32);
void blf_cbc_encrypt(blf_ctx *, uint8 *, uint8 *, uint32);
void blf_cbc_decrypt(blf_ctx *, uint8 *, uint8 *, uint32);
#endif