Strophe 0.12
XMPP client library
Macros | Functions
uuid.c File Reference

Generation of UUID version 4 according to RFC4122. More...

Macros

#define XMPP_UUID_LEN   36
 UUID length in string representation excluding '\0'. More...
 

Functions

static void crypto_uuid_gen (xmpp_ctx_t *ctx, char *uuid)
 Generate UUID version 4 in pre-allocated buffer. More...
 
char * xmpp_uuid_gen (xmpp_ctx_t *ctx)
 Generate UUID version 4. More...
 

Detailed Description

Generation of UUID version 4 according to RFC4122.

Macro Definition Documentation

◆ XMPP_UUID_LEN

#define XMPP_UUID_LEN   36

UUID length in string representation excluding '\0'.

Function Documentation

◆ crypto_uuid_gen()

static void crypto_uuid_gen ( xmpp_ctx_t *  ctx,
char *  uuid 
)
static

Generate UUID version 4 in pre-allocated buffer.

Parameters
ctxa Strophe context object
uuidpre-allocated buffer of size (XMPP_UUID_LEN + 1)

◆ xmpp_uuid_gen()

char * xmpp_uuid_gen ( xmpp_ctx_t *  ctx)

Generate UUID version 4.

This function allocates memory for the resulting string and must be freed with xmpp_free().

Parameters
ctxa Strophe context object
Returns
ASCIIZ string