예제 #1
0
 private static string GetPK()
 {
     if (Application.platform == RuntimePlatform.Android)
     {
         return(CodesignUtils.GetAndroidPkMD5());
     }
     else
     {
         return(CodesignUtils.GetSuperAndroidPK());
     }
 }
예제 #2
0
 private static void GetZipReport(Action <ReadZipReport> onResult)
 {
     if (Application.platform == RuntimePlatform.Android)
     {
         CodesignUtils.GetAndroidCodeMD5Asyn(onResult);
     }
     else
     {
         var md5    = CodesignUtils.GetSuperCodeMD5();
         var report = new ReadZipReport
         {
             codeMD5     = md5,
             fileList    = "",
             fileListMD5 = "",
         };
         onResult?.Invoke(report);
     }
 }
예제 #3
0
 public static void Sign(string time, Action <string> onResult)
 {
     try
     {
         var androidPk = GetPK();
         GetZipReport(report =>
         {
             string ssk         = GetSSK();
             string codeMD5     = report.codeMD5;
             string fileList    = report.fileList;
             string fileListMD5 = report.fileListMD5;
             var sign           = CodesignUtils.Encry(time, androidPk, codeMD5, ssk, fileList, fileListMD5);
             onResult?.Invoke(sign);
         });
     }
     catch (Exception e)
     {
         Debug.LogException(e);
         throw;
     }
 }