|
|
@@ -1,13 +1,18 @@
|
|
|
package com.sheep.jiuyan.samllsheep.utils;
|
|
|
|
|
|
+import static com.sheep.gamegroup.model.api.BaseMessageConverter.uint8ToHex;
|
|
|
+
|
|
|
import android.content.Context;
|
|
|
import android.content.SharedPreferences;
|
|
|
import android.text.TextUtils;
|
|
|
|
|
|
import com.sheep.gamegroup.greendao.DDProviderHelper;
|
|
|
import com.sheep.gamegroup.greendao.download.SdkLoginUser;
|
|
|
+import com.sheep.gamegroup.model.api.BaseMessageConverter;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
|
|
|
+import org.xxtea.XXTEA;
|
|
|
+
|
|
|
import go.kfzssafe.Kfzssafe;
|
|
|
|
|
|
/**
|
|
|
@@ -132,7 +137,7 @@ public class SpUtils {
|
|
|
public static void saveUp(Context context, String u, String p) {
|
|
|
SharedPreferences user = context.getSharedPreferences("up", Context.MODE_PRIVATE);
|
|
|
SharedPreferences.Editor editor = user.edit();
|
|
|
- editor.putString("u_" + u, Kfzssafe.xEncodeS2S(p));
|
|
|
+ editor.putString("u_" + u, BaseMessageConverter.encrypt(p));
|
|
|
editor.apply();
|
|
|
}
|
|
|
|
|
|
@@ -143,7 +148,8 @@ public class SpUtils {
|
|
|
if (TextUtils.isEmpty(p)) {
|
|
|
return "";
|
|
|
} else {
|
|
|
- return Kfzssafe.xDecodeS2S(p);
|
|
|
+ return BaseMessageConverter.decrypt(p);
|
|
|
+// return Kfzssafe.xDecodeS2S(p);
|
|
|
}
|
|
|
}
|
|
|
|