#####Extension for generating v5 UUIDs
By Danilo Topalovic.
UUIDv5 is commonly used for generating namespace based unique identifiers. the namespace is also a valid UUID.
see: wikipedia
Swift 3.0
currently only Carthage is supported, sorry.
Cartfile:
github "dtop/SwiftUUIDv5"
if let namespace = UUID(uuidString: "6BA7B811-9DAD-11D1-80B4-00C04FD430C8") {
guard let customerUuid = UUID(namespace: namespace, name: "your-customer@customer.com") else {
// ...
}
let customerId = customerUuid.uuidString
// ...
}