~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to contrib/pgcrypto/blf.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-01 17:41:41 UTC
  • mfrom: (1.1.4 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20090701174141-jfmn9tt8e69m950x
Tags: 8.4.0-1
* Final 8.4.0 release. Major enhancements:
  - Windowing Functions
  - Common Table Expressions and Recursive Queries
  - Default and variadic parameters for functions
  - Parallel Restore
  - Column Permissions
  - Per-database locale settings
  - Improved hash indexes
  - Improved join performance for EXISTS and NOT EXISTS queries
  - Easier-to-use Warm Standby
  - Automatic sizing of the Free Space Map
  - Visibility Map (greatly reduces vacuum overhead for slowly-changing
    tables)
  - Version-aware psql (backslash commands work against older servers)
  - Support SSL certificates for user authentication
  - Per-function runtime statistics
  - Easy editing of functions in psql
  - New contrib modules: pg_stat_statements, auto_explain, citext,
    btree_gin 
  Upload to unstable, 8.4 is the new default. 
* debian/control: Build the versionless metapackages and have them point to
  8.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Butchered version of sshblowf.c from putty-0.59.
3
3
 *
4
 
 * $PostgreSQL: pgsql/contrib/pgcrypto/blf.c,v 1.9 2007/11/15 21:14:31 momjian Exp $
 
4
 * $PostgreSQL: pgsql/contrib/pgcrypto/blf.c,v 1.10 2009/06/11 14:48:52 momjian Exp $
5
5
 */
6
6
 
7
7
/*
251
251
 
252
252
static void
253
253
blowfish_encrypt(uint32 xL, uint32 xR, uint32 *output,
254
 
                                 BlowfishContext * ctx)
 
254
                                 BlowfishContext *ctx)
255
255
{
256
256
        uint32     *S0 = ctx->S0;
257
257
        uint32     *S1 = ctx->S1;
285
285
 
286
286
static void
287
287
blowfish_decrypt(uint32 xL, uint32 xR, uint32 *output,
288
 
                                 BlowfishContext * ctx)
 
288
                                 BlowfishContext *ctx)
289
289
{
290
290
        uint32     *S0 = ctx->S0;
291
291
        uint32     *S1 = ctx->S1;
318
318
}
319
319
 
320
320
void
321
 
blowfish_encrypt_cbc(uint8 *blk, int len, BlowfishContext * ctx)
 
321
blowfish_encrypt_cbc(uint8 *blk, int len, BlowfishContext *ctx)
322
322
{
323
323
        uint32          xL,
324
324
                                xR,
351
351
}
352
352
 
353
353
void
354
 
blowfish_decrypt_cbc(uint8 *blk, int len, BlowfishContext * ctx)
 
354
blowfish_decrypt_cbc(uint8 *blk, int len, BlowfishContext *ctx)
355
355
{
356
356
        uint32          xL,
357
357
                                xR,
384
384
}
385
385
 
386
386
void
387
 
blowfish_encrypt_ecb(uint8 *blk, int len, BlowfishContext * ctx)
 
387
blowfish_encrypt_ecb(uint8 *blk, int len, BlowfishContext *ctx)
388
388
{
389
389
        uint32          xL,
390
390
                                xR,
405
405
}
406
406
 
407
407
void
408
 
blowfish_decrypt_ecb(uint8 *blk, int len, BlowfishContext * ctx)
 
408
blowfish_decrypt_ecb(uint8 *blk, int len, BlowfishContext *ctx)
409
409
{
410
410
        uint32          xL,
411
411
                                xR,
426
426
}
427
427
 
428
428
void
429
 
blowfish_setkey(BlowfishContext * ctx,
 
429
blowfish_setkey(BlowfishContext *ctx,
430
430
                                const uint8 *key, short keybytes)
431
431
{
432
432
        uint32     *S0 = ctx->S0;
492
492
}
493
493
 
494
494
void
495
 
blowfish_setiv(BlowfishContext * ctx, const uint8 *iv)
 
495
blowfish_setiv(BlowfishContext *ctx, const uint8 *iv)
496
496
{
497
497
        ctx->iv0 = GET_32BIT_MSB_FIRST(iv);
498
498
        ctx->iv1 = GET_32BIT_MSB_FIRST(iv + 4);