Changeset 5667:7bc121d15d0e in roaraudio for libroar/uuid.c
- Timestamp:
- 09/23/12 11:59:39 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/uuid.c
r5666 r5667 85 85 } 86 86 87 const roar_uuid_t * roar_uuid_get_ns_real(const char * ns) { 88 static const roar_uuid_t * __null = NULL, 89 dns = {0x6b, 0xa7, 0xb8, 0x10, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}, 90 url = {0x6b, 0xa7, 0xb8, 0x11, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}, 91 oid = {0x6b, 0xa7, 0xb8, 0x12, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}, 92 x500 = {0x6b, 0xa7, 0xb8, 0x14, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}; 93 94 if ( ns == NULL ) { 95 roar_err_set(ROAR_ERROR_FAULT); 96 return __null; 97 } 98 99 if ( !strcasecmp(ns, "dns") ) { 100 return &dns; 101 } else if ( !strcasecmp(ns, "url") ) { 102 return &url; 103 } else if ( !strcasecmp(ns, "iso oid") || !strcasecmp(ns, "oid") ) { 104 return &oid; 105 } else if ( !strcasecmp(ns, "X.500 DN") || !strcasecmp(ns, "X500 DN") || !strcasecmp(ns, "x500") ) { 106 return &x500; 107 } 108 109 roar_err_set(ROAR_ERROR_NOENT); 110 return __null; 111 } 112 87 113 int roar_uuid_gen(roar_uuid_t uuid, enum roar_uuid_type type, const roar_uuid_t ns, const void * argp, ssize_t arglen) { 88 114 unsigned char digest[20];
Note: See TracChangeset
for help on using the changeset viewer.