]> git.saurik.com Git - apple/security.git/blobdiff - securityd/libsecurity_agent/lib/utils.c
Security-57031.1.35.tar.gz
[apple/security.git] / securityd / libsecurity_agent / lib / utils.c
diff --git a/securityd/libsecurity_agent/lib/utils.c b/securityd/libsecurity_agent/lib/utils.c
new file mode 100644 (file)
index 0000000..f3d0839
--- /dev/null
@@ -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;
+}