Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Unique identifiers: url hash
public static string HostnameHash(Uri uri)
// e.g. Uri uri = new Uri("");
// gives eaafc653
int hashcode = uri.GetHashCode();
Console.Write(string.Format("{0:X}", hashcode).ToLower());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment