WockyCapsHash

WockyCapsHash — Utilities for computing verification string hash

Synopsis

gchar *             wocky_caps_hash_compute_from_lists  (GPtrArray *features,
                                                         GPtrArray *identities,
                                                         GPtrArray *dataforms);
gchar *             wocky_caps_hash_compute_from_node   (WockyNode *node);

Description

Computes verification string hashes according to XEP-0115 v1.5

Details

wocky_caps_hash_compute_from_lists ()

gchar *             wocky_caps_hash_compute_from_lists  (GPtrArray *features,
                                                         GPtrArray *identities,
                                                         GPtrArray *dataforms);

Compute the hash as defined by the XEP-0115 from a list of features, identities and dataforms.

features :

a GPtrArray of strings of features

identities :

a GPtrArray of WockyDiscoIdentity structures

dataforms :

a GPtrArray of WockyDataForm objects, or NULL

Returns :

a newly allocated string of the caps hash which should be freed using g_free()

wocky_caps_hash_compute_from_node ()

gchar *             wocky_caps_hash_compute_from_node   (WockyNode *node);

Compute the hash as defined by the XEP-0115 from a received WockyNode.

node should be the top-level node from a disco response such as the example given in XEP-0115 §5.3 "Complex Generation Example".

node :

a WockyNode

Returns :

the hash. The called must free the returned hash with g_free().