diff options
author | Bruce Momjian <bruce@momjian.us> | 2009-06-11 14:49:15 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2009-06-11 14:49:15 +0000 |
commit | d7471402794266078953f1bd113dab4913d631a1 (patch) | |
tree | 618e392a84eaf837e00bf78f8694097b78fec227 /contrib/pgcrypto/internal.c | |
parent | 4e86efb4e51b66ef57b3fe6f28576de23a1bf1c6 (diff) | |
download | postgresql-d7471402794266078953f1bd113dab4913d631a1.tar.gz |
8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
Diffstat (limited to 'contrib/pgcrypto/internal.c')
-rw-r--r-- | contrib/pgcrypto/internal.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c index 56634aa32a..84bda624a4 100644 --- a/contrib/pgcrypto/internal.c +++ b/contrib/pgcrypto/internal.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $PostgreSQL: pgsql/contrib/pgcrypto/internal.c,v 1.28 2008/02/17 02:09:26 tgl Exp $ + * $PostgreSQL: pgsql/contrib/pgcrypto/internal.c,v 1.29 2009/06/11 14:48:52 momjian Exp $ */ #include "postgres.h" @@ -75,18 +75,18 @@ #define SHA1_BLOCK_SIZE 64 #define MD5_BLOCK_SIZE 64 -static void init_md5(PX_MD * h); -static void init_sha1(PX_MD * h); +static void init_md5(PX_MD *h); +static void init_sha1(PX_MD *h); -void init_sha224(PX_MD * h); -void init_sha256(PX_MD * h); -void init_sha384(PX_MD * h); -void init_sha512(PX_MD * h); +void init_sha224(PX_MD *h); +void init_sha256(PX_MD *h); +void init_sha384(PX_MD *h); +void init_sha512(PX_MD *h); struct int_digest { char *name; - void (*init) (PX_MD * h); + void (*init) (PX_MD *h); }; static const struct int_digest @@ -103,19 +103,19 @@ static const struct int_digest /* MD5 */ static unsigned -int_md5_len(PX_MD * h) +int_md5_len(PX_MD *h) { return MD5_DIGEST_LENGTH; } static unsigned -int_md5_block_len(PX_MD * h) +int_md5_block_len(PX_MD *h) { return MD5_BLOCK_SIZE; } static void -int_md5_update(PX_MD * h, const uint8 *data, unsigned dlen) +int_md5_update(PX_MD *h, const uint8 *data, unsigned dlen) { MD5_CTX *ctx = (MD5_CTX *) h->p.ptr; @@ -123,7 +123,7 @@ int_md5_update(PX_MD * h, const uint8 *data, unsigned dlen) } static void -int_md5_reset(PX_MD * h) +int_md5_reset(PX_MD *h) { MD5_CTX *ctx = (MD5_CTX *) h->p.ptr; @@ -131,7 +131,7 @@ int_md5_reset(PX_MD * h) } static void -int_md5_finish(PX_MD * h, uint8 *dst) +int_md5_finish(PX_MD *h, uint8 *dst) { MD5_CTX *ctx = (MD5_CTX *) h->p.ptr; @@ -139,7 +139,7 @@ int_md5_finish(PX_MD * h, uint8 *dst) } static void -int_md5_free(PX_MD * h) +int_md5_free(PX_MD *h) { MD5_CTX *ctx = (MD5_CTX *) h->p.ptr; @@ -151,19 +151,19 @@ int_md5_free(PX_MD * h) /* SHA1 */ static unsigned -int_sha1_len(PX_MD * h) +int_sha1_len(PX_MD *h) { return SHA1_DIGEST_LENGTH; } static unsigned -int_sha1_block_len(PX_MD * h) +int_sha1_block_len(PX_MD *h) { return SHA1_BLOCK_SIZE; } static void -int_sha1_update(PX_MD * h, const uint8 *data, unsigned dlen) +int_sha1_update(PX_MD *h, const uint8 *data, unsigned dlen) { SHA1_CTX *ctx = (SHA1_CTX *) h->p.ptr; @@ -171,7 +171,7 @@ int_sha1_update(PX_MD * h, const uint8 *data, unsigned dlen) } static void -int_sha1_reset(PX_MD * h) +int_sha1_reset(PX_MD *h) { SHA1_CTX *ctx = (SHA1_CTX *) h->p.ptr; @@ -179,7 +179,7 @@ int_sha1_reset(PX_MD * h) } static void -int_sha1_finish(PX_MD * h, uint8 *dst) +int_sha1_finish(PX_MD *h, uint8 *dst) { SHA1_CTX *ctx = (SHA1_CTX *) h->p.ptr; @@ -187,7 +187,7 @@ int_sha1_finish(PX_MD * h, uint8 *dst) } static void -int_sha1_free(PX_MD * h) +int_sha1_free(PX_MD *h) { SHA1_CTX *ctx = (SHA1_CTX *) h->p.ptr; @@ -199,7 +199,7 @@ int_sha1_free(PX_MD * h) /* init functions */ static void -init_md5(PX_MD * md) +init_md5(PX_MD *md) { MD5_CTX *ctx; @@ -219,7 +219,7 @@ init_md5(PX_MD * md) } static void -init_sha1(PX_MD * md) +init_sha1(PX_MD *md) { SHA1_CTX *ctx; @@ -260,7 +260,7 @@ struct int_ctx }; static void -intctx_free(PX_Cipher * c) +intctx_free(PX_Cipher *c) { struct int_ctx *cx = (struct int_ctx *) c->ptr; @@ -280,25 +280,25 @@ intctx_free(PX_Cipher * c) #define MODE_CBC 1 static unsigned -rj_block_size(PX_Cipher * c) +rj_block_size(PX_Cipher *c) { return 128 / 8; } static unsigned -rj_key_size(PX_Cipher * c) +rj_key_size(PX_Cipher *c) { return 256 / 8; } static unsigned -rj_iv_size(PX_Cipher * c) +rj_iv_size(PX_Cipher *c) { return 128 / 8; } static int -rj_init(PX_Cipher * c, const uint8 *key, unsigned klen, const uint8 *iv) +rj_init(PX_Cipher *c, const uint8 *key, unsigned klen, const uint8 *iv) { struct int_ctx *cx = (struct int_ctx *) c->ptr; @@ -327,7 +327,7 @@ rj_real_init(struct int_ctx * cx, int dir) } static int -rj_encrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) +rj_encrypt(PX_Cipher *c, const uint8 *data, unsigned dlen, uint8 *res) { struct int_ctx *cx = (struct int_ctx *) c->ptr; @@ -357,7 +357,7 @@ rj_encrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) } static int -rj_decrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) +rj_decrypt(PX_Cipher *c, const uint8 *data, unsigned dlen, uint8 *res) { struct int_ctx *cx = (struct int_ctx *) c->ptr; @@ -418,25 +418,25 @@ rj_load(int mode) */ static unsigned -bf_block_size(PX_Cipher * c) +bf_block_size(PX_Cipher *c) { return 8; } static unsigned -bf_key_size(PX_Cipher * c) +bf_key_size(PX_Cipher *c) { return 448 / 8; } static unsigned -bf_iv_size(PX_Cipher * c) +bf_iv_size(PX_Cipher *c) { return 8; } static int -bf_init(PX_Cipher * c, const uint8 *key, unsigned klen, const uint8 *iv) +bf_init(PX_Cipher *c, const uint8 *key, unsigned klen, const uint8 *iv) { struct int_ctx *cx = (struct int_ctx *) c->ptr; @@ -448,7 +448,7 @@ bf_init(PX_Cipher * c, const uint8 *key, unsigned klen, const uint8 *iv) } static int -bf_encrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) +bf_encrypt(PX_Cipher *c, const uint8 *data, unsigned dlen, uint8 *res) { struct int_ctx *cx = (struct int_ctx *) c->ptr; BlowfishContext *bfctx = &cx->ctx.bf; @@ -473,7 +473,7 @@ bf_encrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) } static int -bf_decrypt(PX_Cipher * c, const uint8 *data, unsigned dlen, uint8 *res) +bf_decrypt(PX_Cipher *c, const uint8 *data, unsigned dlen, uint8 *res) { struct int_ctx *cx = (struct int_ctx *) c->ptr; BlowfishContext *bfctx = &cx->ctx.bf; @@ -577,7 +577,7 @@ static const PX_Alias int_aliases[] = { /* PUBLIC FUNCTIONS */ int -px_find_digest(const char *name, PX_MD ** res) +px_find_digest(const char *name, PX_MD **res) { const struct int_digest *p; PX_MD *h; @@ -596,7 +596,7 @@ px_find_digest(const char *name, PX_MD ** res) } int -px_find_cipher(const char *name, PX_Cipher ** res) +px_find_cipher(const char *name, PX_Cipher **res) { int i; PX_Cipher *c = NULL; |