~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-1.0/libdrizzle/pack.c

  • Committer: Monty Taylor
  • Date: 2011-04-03 20:53:07 UTC
  • mfrom: (2267 build)
  • mto: (2268.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2268.
  • Revision ID: mordred@inaugust.com-20110403205307-pymvfr1goq3zxze8
Merged Eliot into trunk. Fixed windows build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
static drizzle_return_t _pack_scramble_hash(drizzle_con_st *con,
265
265
                                            uint8_t *buffer)
266
266
{
 
267
  uint32_t x;
267
268
  SHA1_CTX ctx;
268
269
  uint8_t hash_tmp1[SHA1_DIGEST_LENGTH];
269
270
  uint8_t hash_tmp2[SHA1_DIGEST_LENGTH];
300
301
  SHA1Final(buffer, &ctx);
301
302
 
302
303
  /* Fourth, xor the last hash against the first password hash. */
303
 
  uint32_t x= 0;
 
304
  x= 0;
304
305
  for (; x < SHA1_DIGEST_LENGTH; x++)
305
306
    buffer[x]= buffer[x] ^ hash_tmp1[x];
306
307