public static string ApplyMD5(string str) { byte[] array = SwrveHelper.MD5(str); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < array.Length; i++) { stringBuilder.Append(array[i].ToString("x2")); } return(stringBuilder.ToString()); }
private static string CreateSessionToken(string apiKey, int appId, string userId, long time) { string text = SwrveHelper.ApplyMD5(string.Format("{0}{1}{2}", userId, time, apiKey)); return(string.Format("{0}={1}={2}={3}", new object[] { appId, userId, time, text })); }
protected static string CreateSessionToken(string apiKey, int appId, string userId, long time) { var md5Hash = SwrveHelper.ApplyMD5(String.Format("{0}{1}{2}", userId, time, apiKey)); return(String.Format("{0}={1}={2}={3}", appId, userId, time, md5Hash)); }
public static bool IsOnDevice() { return(SwrveHelper.IsAvailableOn(RuntimePlatform.Android)); }
public static bool IsNotOnDevice() { return(!SwrveHelper.IsOnDevice()); }
private static string CreateSessionToken(string apiKey, int appId, string userId, long time) { string text = SwrveHelper.ApplyMD5($"{userId}{time}{apiKey}"); return($"{appId}={userId}={time}={text}"); }