rpm 5.2.1
Functions

rpmio/rpmuuid.c File Reference

#include "system.h"
#include <string.h>
#include "rpmlog.h"
#include "rpmuuid.h"
#include "debug.h"
Include dependency graph for rpmuuid.c:

Go to the source code of this file.

Functions

int rpmuuidMake (int version, const char *ns, const char *data, char *buf_str, unsigned char *buf_bin)
 Generate a Universally Unique Identifier (UUID).

Detailed Description

Definition in file rpmuuid.c.


Function Documentation

int rpmuuidMake ( int  version,
const char *  ns,
const char *  data,
char *  buf_str,
unsigned char *  buf_bin 
)

Generate a Universally Unique Identifier (UUID).

Parameters:
versionUUID version 1, 3, 4 or 5
nsnamespace UUID in string representation or symbolic name (UUID version 3 and 5 only)
datadata to digest (UUID version 3 and 5 only)
Return values:
buf_strbuffer of at least 37 bytes (UUID_LEN_STR+1) to store UUID in string representation
buf_binbuffer of at least 16 bytes (UUID_LEN_BIN) to store UUID in binary representation
Returns:
0 on success, 1 on failure

Definition at line 23 of file rpmuuid.c.

References _, rpmlog(), RPMLOG_ERR, and uuid_ns.

Referenced by doFoo(), str2uuid(), and tv2uuidv1().