X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/80e2389990082500d76eb566d4946be3e786c3ef..d8f41ccd20de16f8ebe2ccc84d47bf1cb2b26bbb:/securityd/libsecurity_agent/lib/utils.c?ds=inline diff --git a/securityd/libsecurity_agent/lib/utils.c b/securityd/libsecurity_agent/lib/utils.c new file mode 100644 index 00000000..f3d08392 --- /dev/null +++ b/securityd/libsecurity_agent/lib/utils.c @@ -0,0 +1,26 @@ +/* + * utils.h + * libsecurity_agent + * + * Copyright (c) 2010-2011 Apple Inc. All Rights Reserved. + * + */ + + +#include "utils.h" + +unsigned char * +uuid_init_with_sessionid(uuid_t uuid, uint32_t sessionid) +{ + uuid_t tmp = UUID_INITIALIZER_FROM_SESSIONID(sessionid); + + uuid_copy(uuid, tmp); + return &uuid[0]; +} + +const char * +uuid_to_string(const uuid_t uuid, char *buf) +{ + uuid_unparse_lower(uuid, buf); + return buf; +}