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

« back to all changes in this revision

Viewing changes to contrib/pgcrypto/md5.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29
29
 * SUCH DAMAGE.
30
30
 *
31
 
 * $PostgreSQL: pgsql/contrib/pgcrypto/md5.c,v 1.14 2007/04/06 05:36:50 tgl Exp $
 
31
 * $PostgreSQL: pgsql/contrib/pgcrypto/md5.c,v 1.15 2009/06/11 14:48:52 momjian Exp $
32
32
 */
33
33
 
34
34
#include "postgres.h"
136
136
static void md5_calc(uint8 *, md5_ctxt *);
137
137
 
138
138
void
139
 
md5_init(md5_ctxt * ctxt)
 
139
md5_init(md5_ctxt *ctxt)
140
140
{
141
141
        ctxt->md5_n = 0;
142
142
        ctxt->md5_i = 0;
148
148
}
149
149
 
150
150
void
151
 
md5_loop(md5_ctxt * ctxt, const uint8 *input, unsigned len)
 
151
md5_loop(md5_ctxt *ctxt, const uint8 *input, unsigned len)
152
152
{
153
153
        unsigned int gap,
154
154
                                i;
175
175
}
176
176
 
177
177
void
178
 
md5_pad(md5_ctxt * ctxt)
 
178
md5_pad(md5_ctxt *ctxt)
179
179
{
180
180
        unsigned int gap;
181
181
 
213
213
}
214
214
 
215
215
void
216
 
md5_result(uint8 *digest, md5_ctxt * ctxt)
 
216
md5_result(uint8 *digest, md5_ctxt *ctxt)
217
217
{
218
218
        /* 4 byte words */
219
219
#ifndef WORDS_BIGENDIAN
243
243
#endif
244
244
 
245
245
static void
246
 
md5_calc(uint8 *b64, md5_ctxt * ctxt)
 
246
md5_calc(uint8 *b64, md5_ctxt *ctxt)
247
247
{
248
248
        uint32          A = ctxt->md5_sta;
249
249
        uint32          B = ctxt->md5_stb;