Commit 32269cf9cb664d18140bef2e9a53ad1c9c6f6e27
- Diff rendering mode:
- inline
- side by side
lib/strokedb/util/uuid.rb
(5 / 3)
|   | |||
| 137 | 137 | def self.sha1_uuid(oid) | |
| 138 | 138 | ::UUID.sha1_create(UUID_OID_NAMESPACE, oid).to_s | |
| 139 | 139 | end | |
| 140 | |||
| 141 | RAW_UUID_SIZE = random_uuid_raw.size | ||
| 142 | FORMATTED_UUID_SIZE = random_uuid.size | ||
| 143 | 140 | ||
| 144 | 141 | class ::String | |
| 145 | 142 | # Convert to raw (16 bytes) string (self can be already raw or formatted). | |
| … | … | ||
| 150 | 150 | end | |
| 151 | 151 | ||
| 152 | 152 | end | |
| 153 | end | ||
| 154 | |||
| 155 | module StrokeDB::Util | ||
| 156 | RAW_UUID_SIZE = random_uuid_raw.size | ||
| 157 | FORMATTED_UUID_SIZE = random_uuid.size | ||
| 153 | 158 | end |

