Ignore:
Timestamp:
2023-04-01T20:09:39Z (13 months ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
552da22
Parents:
59c9fa4d
git-author:
Jelmer Vernooij <jelmer@…> (01-04-23 20:09:39)
git-committer:
GitHub <noreply@…> (01-04-23 20:09:39)
Message:

Deprecate sha1_* functions (#172)

  • Migrate sha1 calls to direct use of GChecksum
  • Mark sha1.h functions as deprecated
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/conference.c

    r59c9fa4d ra4ac9c4  
    2323
    2424#include "jabber.h"
    25 #include "sha1.h"
    2625
    2726static xt_status jabber_chat_join_failed(struct im_connection *ic, struct xt_node *node, struct xt_node *orig);
     
    7978        struct jabber_chat *jc;
    8079        struct groupchat *c;
    81         sha1_state_t sum;
     80        GChecksum *sum;
    8281        double now = gettime();
    8382        char *uuid, *rjid, *cserv;
    8483
    85         sha1_init(&sum);
    86         sha1_append(&sum, (uint8_t *) ic->acc->user, strlen(ic->acc->user));
    87         sha1_append(&sum, (uint8_t *) &now, sizeof(now));
    88         sha1_append(&sum, (uint8_t *) who, strlen(who));
    89         uuid = sha1_random_uuid(&sum);
     84        sum = g_checksum_new(G_CHECKSUM_SHA1);
     85        g_checksum_update(sum, (uint8_t *) ic->acc->user, strlen(ic->acc->user));
     86        g_checksum_update(sum, (uint8_t *) &now, sizeof(now));
     87        g_checksum_update(sum, (uint8_t *) who, strlen(who));
     88        uuid = sha1_random_uuid(sum);
    9089
    9190        if (jd->flags & JFLAG_GTALK) {
Note: See TracChangeset for help on using the changeset viewer.