GetChecksum() public method

public GetChecksum ( string key = "Checksum" ) : string
key string
return string
コード例 #1
0
ファイル: UpdateInfo.cs プロジェクト: 756616071/mRemoteNG
        public static UpdateInfo FromString(string input)
        {
            var newInfo = new UpdateInfo();

            if (string.IsNullOrEmpty(input))
            {
                newInfo.IsValid = false;
            }
            else
            {
                var updateFile = new UpdateFile(input);
                newInfo.Version          = updateFile.GetVersion();
                newInfo.DownloadAddress  = updateFile.GetUri("dURL");
                newInfo.ChangeLogAddress = updateFile.GetUri("clURL");
#if false
                newInfo.ImageAddress     = updateFile.GetUri("imgURL");
                newInfo.ImageLinkAddress = updateFile.GetUri("imgURLLink");
#endif
#if !PORTABLE
                newInfo.CertificateThumbprint = updateFile.GetThumbprint();
#endif
                newInfo.FileName = updateFile.GetFileName();
                newInfo.Checksum = updateFile.GetChecksum();
                newInfo.IsValid  = newInfo.CheckIfValid();
            }

            return(newInfo);
        }
コード例 #2
0
ファイル: UpdateInfo.cs プロジェクト: mRemoteNG/mRemoteNG
 public static UpdateInfo FromString(string input)
 {
     var newInfo = new UpdateInfo();
     if (string.IsNullOrEmpty(input))
     {
         newInfo.IsValid = false;
     }
     else
     {
         var updateFile = new UpdateFile(input);
         newInfo.Version = updateFile.GetVersion();
         newInfo.DownloadAddress = updateFile.GetUri("dURL");
         newInfo.ChangeLogAddress = updateFile.GetUri("clURL");
         newInfo.ImageAddress = updateFile.GetUri("imgURL");
         newInfo.ImageLinkAddress = updateFile.GetUri("imgURLLink");
     #if !PORTABLE
         newInfo.CertificateThumbprint = updateFile.GetThumbprint();
     #endif
         newInfo.FileName = updateFile.GetFileName();
         newInfo.Checksum = updateFile.GetChecksum();
         newInfo.IsValid = true;
     }
     return newInfo;
 }