~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/libdrizzle/pack.cc

  • Committer: Monty Taylor
  • Date: 2011-04-03 17:53:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2266.
  • Revision ID: mordred@inaugust.com-20110403175349-xf83agw74zgfdyw0
A couple of small changes (thanks Marc)

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
 
  for (uint32_t x= 0; x < SHA1_DIGEST_LENGTH; x++)
 
304
  for (x= 0; x < SHA1_DIGEST_LENGTH; x++)
304
305
    buffer[x]= buffer[x] ^ hash_tmp1[x];
305
306
 
306
307
  return DRIZZLE_RETURN_OK;