~ubuntu-branches/ubuntu/quantal/pidgin/quantal

« back to all changes in this revision

Viewing changes to libpurple/protocols/gg/lib/sha1.c

  • Committer: Bazaar Package Importer
  • Author(s): Ari Pollak
  • Date: 2011-06-13 21:17:20 UTC
  • mfrom: (1.3.19 upstream)
  • mto: This revision was merged to the branch mainline in revision 73.
  • Revision ID: james.westby@ubuntu.com-20110613211720-ke87vzmdcuaxams7
Tags: 2.8.0-1
* Imported Upstream version 2.8.0 (Closes: #630124)
* Remove SILC support since the library will be orphaned (Closes: #629222)
* Fix typo in libpurple-bin description (Closes: #625462)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: sha1.c 632 2008-07-30 18:40:06Z darkjames $ */
 
1
/* $Id: sha1.c 1067 2011-03-15 18:57:16Z wojtekka $ */
2
2
 
3
3
/*
4
4
 *  (C) Copyright 2007 Wojtek Kaniewski <wojtekka@irc.pl>
23
23
/**
24
24
 * \file sha1.c
25
25
 *
26
 
 * \brief Funkcje wyznaczania skrĂłtu SHA1
 
26
 * \brief Funkcje wyznaczania skrótu SHA1
27
27
 */
28
28
 
29
29
#include <string.h>
228
228
void gg_login_hash_sha1(const char *password, uint32_t seed, uint8_t *result)
229
229
{
230
230
        SHA_CTX ctx;
231
 
 
 
231
        
232
232
        SHA1_Init(&ctx);
233
233
        SHA1_Update(&ctx, (const unsigned char*) password, strlen(password));
234
234
        seed = gg_fix32(seed);
235
235
        SHA1_Update(&ctx, (uint8_t*) &seed, 4);
236
 
 
 
236
        
237
237
        SHA1_Final(result, &ctx);
238
238
}
239
239