Exemple #1
0
        public static bool CheckXEXChecksum(byte[] xexchecksum)
        {
            byte[] numArray = File.ReadAllBytes(XEXHelper.ReadConfString("LatestXEXName"));
            SHA1   sHA1     = SHA1.Create();

            sHA1.Initialize();
            sHA1.TransformFinalBlock(numArray, 0, (int)numArray.Length);
            return(sHA1.Hash.SequenceEqual <byte>(xexchecksum));
        }
Exemple #2
0
 private static void WriteConfInt(string entry, int value)
 {
     XEXHelper.WriteConfString(entry, value.ToString());
 }
Exemple #3
0
 public static void UpdateXEX(byte xexversion, string xexname)
 {
     XEXHelper.WriteConfInt("LatestXEXVersion", (int)xexversion);
     XEXHelper.WriteConfString("LatestXEXName", xexname);
 }
Exemple #4
0
 private static int ReadConfInt(string entry)
 {
     return(int.Parse(XEXHelper.ReadConfString(entry)));
 }
Exemple #5
0
 public static int GetXEXVersion()
 {
     return(XEXHelper.ReadConfInt("LatestXEXVersion"));
 }
Exemple #6
0
 public static string GetXEXName()
 {
     return(XEXHelper.ReadConfString("LatestXEXName"));
 }
Exemple #7
0
 public static bool CheckXEXVersion(byte xexversion)
 {
     return(xexversion >= (byte)XEXHelper.ReadConfInt("LatestXEXVersion"));
 }