public static Hashtable GetDeviceInfo() { Hashtable data = Johny.HashtablePool.Claim(); data["os"] = SystemInfo.operatingSystem; #if UNITY_IPHONE && !UNITY_EDITOR var mac = _GetMACAddress(); if (!string.IsNullOrEmpty(mac)) { var bytes = Encoding.FromHexString(mac); data["mac"] = mac; data["odin1"] = Encoding.ToHexString(Digest.Sha1().Update(bytes).Final()); } data["model"] = _GetModel(); data["openudid"] = _GetOpenUDID(); data["udid"] = _GetUDID(); data["ifa"] = _GetIFA(); #elif UNITY_ANDROID && !UNITY_EDITOR data["mac"] = GetMACAddress(); data["device_id"] = GetAndroidDeviceID(); data["model"] = SystemInfo.deviceModel; #elif UNITY_EDITOR data["mac"] = GetMACAddress(); data["device_id"] = SystemInfo.deviceName; data["model"] = EB.Sparx.Device.DeviceModel; data["gpu"] = EB.Sparx.Device.DeviceGPU; data["caps"] = EB.Sparx.Device.DeviceCaps; #endif return(data); }
public static Hmac Sha1(byte[] key) { return(new Hmac(Digest.Sha1(), key)); }