Ejemplo n.º 1
0
 private static string GetHashString(string input, Encoding encoding)
 {
     if (input == null)
     {
         throw new ArgumentNullException("input", "Unable to calculate hash over null input data");
     }
     if (encoding == null)
     {
         throw new ArgumentNullException("encoding", "Unable to calculate hash over a string without a default encoding. Consider using the GetHashString(string) overload to use UTF8 Encoding");
     }
     byte[] bytes = encoding.GetBytes(input);
     return(MD5Util.GetHashString(bytes));
 }
Ejemplo n.º 2
0
 internal static string GetHashString(string input)
 {
     return(MD5Util.GetHashString(input, new UTF8Encoding()));
 }
Ejemplo n.º 3
0
        internal static string getCheckSummary(string content, string sdkVersion, string appID)
        {
            string input = WXApiImplV1.trimToEmpty(content) + WXApiImplV1.trimToEmpty(sdkVersion) + WXApiImplV1.trimToEmpty(appID);

            return(MD5Util.GetHashString(input));
        }