Beispiel #1
0
        public static string GetResourceIdentifier(string url)
        {
            if (!IsValidURL(url, out url))
            {
                throw new InvalidResourceException($"The url '{url}' is in the wrong format");
            }

            return(HashHelper.GetSHA256(url));
        }
Beispiel #2
0
 public static string GetResourceIdentifier(Stream stream)
 {
     return(HashHelper.GetSHA256(stream));
 }
Beispiel #3
0
 public static string GetResourceIdentifier(byte[] file)
 {
     return(HashHelper.GetSHA256(file));
 }