linux、unix、OSX生成uuid

uuidgen

uuid_generate(uuid_t uu),


// Create universally unique identifier (object)  
CFUUIDRef uuidObject = CFUUIDCreate(kCFAllocatorDefault);  

// Get the string representation of CFUUID object.  
NSString *uuidStr = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject);  
CFRelease(uuidObject); 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章