Shortening/Rehashing UUIDs

1) To shorten the UUID, you can simply XOR the top half with the bottom (and repeat until it’s short enough for you). This will preserve the distribution characteristics. Like any solution that shortens the output, it will increase the possibility of collision due to the birthday paradox 2) XOR amounts to a trivial hash, … Read more

YouTube-like GUID

You could use Base64: string base64Guid = Convert.ToBase64String(Guid.NewGuid().ToByteArray()); That generates a string like E1HKfn68Pkms5zsZsvKONw==. Since a GUID is always 128 bits, you can omit the == that you know will always be present at the end and that will give you a 22 character string. This isn’t as short as YouTube though.