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

« back to all changes in this revision

Viewing changes to contrib/pgcrypto/crypt-blowfish.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
 
 * $PostgreSQL: pgsql/contrib/pgcrypto/crypt-blowfish.c,v 1.13 2007/11/15 21:14:31 momjian Exp $
 
2
 * $PostgreSQL: pgsql/contrib/pgcrypto/crypt-blowfish.c,v 1.14 2009/06/11 14:48:52 momjian Exp $
3
3
 *
4
4
 * This code comes from John the Ripper password cracker, with reentrant
5
5
 * and crypt(3) interfaces added, but optimizations specific to password
59
59
{
60
60
        BF_word         S[4][0x100];
61
61
        BF_key          P;
62
 
}       BF_ctx;
 
62
} BF_ctx;
63
63
 
64
64
/*
65
65
 * Magic IV for 64 Blowfish encryptions that we do at the end.
367
367
} while (0)
368
368
 
369
369
static int
370
 
BF_decode(BF_word * dst, const char *src, int size)
 
370
BF_decode(BF_word *dst, const char *src, int size)
371
371
{
372
372
        unsigned char *dptr = (unsigned char *) dst;
373
373
        unsigned char *end = dptr + size;
399
399
}
400
400
 
401
401
static void
402
 
BF_encode(char *dst, const BF_word * src, int size)
 
402
BF_encode(char *dst, const BF_word *src, int size)
403
403
{
404
404
        unsigned char *sptr = (unsigned char *) src;
405
405
        unsigned char *end = sptr + size;
436
436
}
437
437
 
438
438
static void
439
 
BF_swap(BF_word * x, int count)
 
439
BF_swap(BF_word *x, int count)
440
440
{
441
441
        /* Swap on little-endian hardware, else do nothing */
442
442
#ifndef WORDS_BIGENDIAN
518
518
 
519
519
#if BF_ASM
520
520
 
521
 
extern void _BF_body_r(BF_ctx * ctx);
 
521
extern void _BF_body_r(BF_ctx *ctx);
522
522
 
523
523
#define BF_body() \
524
524
        _BF_body_r(&data.ctx);