Created
September 27, 2023 14:11
-
-
Save RimuruDev/11876e21dd3bd19ec6b18c032f29ac70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class MatchExtension | |
{ | |
public static Guid ToGuid(this string id) | |
{ | |
var provider = new MD5CryptoServiceProvider(); | |
var inputBytes = Encoding.Default.GetBytes(id); | |
var hasBytes = provider.ComputeHash(inputBytes); | |
return new Guid(hasBytes); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment