]> git.saurik.com Git - apple/securityd.git/blob - libsecurity_agent/lib/utils.c
securityd-55130.10.tar.gz
[apple/securityd.git] / libsecurity_agent / lib / utils.c
1 /*
2 * utils.h
3 * libsecurity_agent
4 *
5 * Copyright (c) 2010 Apple Inc. All rights reserved.
6 *
7 */
8
9
10 #include "utils.h"
11
12 unsigned char *
13 uuid_init_with_sessionid(uuid_t uuid, uint32_t sessionid)
14 {
15 uuid_t tmp = UUID_INITIALIZER_FROM_SESSIONID(sessionid);
16
17 uuid_copy(uuid, tmp);
18 return &uuid[0];
19 }
20
21 const char *
22 uuid_to_string(const uuid_t uuid, char *buf)
23 {
24 uuid_unparse_lower(uuid, buf);
25 return buf;
26 }