Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static string GetAPKSignature()
- {
- string str = string.Empty;
- if (Root.Instance.buildSettings.buildUser.Contains("LocalPC"))
- {
- return "dprthtmeoqkr";
- }
- string str2 = "jar:file://";
- string dataPath = Application.dataPath;
- string str4 = "!/";
- string str6 = str2 + dataPath + str4;
- FileStream stream = new FileStream(dataPath, FileMode.Open, FileAccess.Read);
- try
- {
- int num2;
- int length = (int) stream.Length;
- byte[] array = new byte[length];
- for (int i = 0; (num2 = stream.Read(array, i, length - i)) > 0; i += num2)
- {
- }
- byte[] buffer2 = new MD5CryptoServiceProvider().ComputeHash(array);
- StringBuilder builder = new StringBuilder();
- for (int j = 0; j < buffer2.Length; j++)
- {
- builder.Append(buffer2[j].ToString("x2"));
- }
- str = builder.ToString();
- }
- finally
- {
- stream.Close();
- }
- return str;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement