Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
bfe40ef5
Commit
bfe40ef5
authored
Nov 29, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
88fbfa5d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
src/main/java/com/common/base/BaseApplication.java
+2
-2
src/main/java/tech/starwin/utils/AccountKitUtils.java
+5
-1
src/main/java/tech/starwin/utils/format_utils/StringDecrypt.java
+1
-1
No files found.
src/main/java/com/common/base/BaseApplication.java
View file @
bfe40ef5
...
@@ -58,8 +58,8 @@ public abstract class BaseApplication extends MultiDexApplication {
...
@@ -58,8 +58,8 @@ public abstract class BaseApplication extends MultiDexApplication {
// }
// }
try
{
try
{
String
appId
=
String
Format
.
fromBase64
(
BuildConfig
.
FACEBOOK_APP_ID
).
split
(
"#-#"
)[
1
]
;
String
appId
=
String
Decrypt
.
uncodeString
(
BuildConfig
.
FACEBOOK_APP_ID
)
;
String
clienToken
=
String
Format
.
fromBase64
(
BuildConfig
.
ACCOUNT_KIT_CLIENT_TOKEN
).
split
(
"#-#"
)[
1
]
;
String
clienToken
=
String
Decrypt
.
uncodeString
(
BuildConfig
.
ACCOUNT_KIT_CLIENT_TOKEN
)
;
FacebookSdk
.
setApplicationId
(
appId
);
FacebookSdk
.
setApplicationId
(
appId
);
FacebookSdk
.
setApplicationName
(
LibConfig
.
APP_NAME
);
FacebookSdk
.
setApplicationName
(
LibConfig
.
APP_NAME
);
FacebookSdk
.
setClientToken
(
clienToken
);
FacebookSdk
.
setClientToken
(
clienToken
);
...
...
src/main/java/tech/starwin/utils/AccountKitUtils.java
View file @
bfe40ef5
...
@@ -7,12 +7,16 @@ import java.lang.reflect.Field;
...
@@ -7,12 +7,16 @@ import java.lang.reflect.Field;
import
tech.starwin.BuildConfig
;
import
tech.starwin.BuildConfig
;
import
tech.starwin.LibConfig
;
import
tech.starwin.LibConfig
;
import
tech.starwin.utils.format_utils.StringDecrypt
;
public
class
AccountKitUtils
{
public
class
AccountKitUtils
{
public
static
boolean
initAccountKit
(
String
facebookAppId
,
String
appName
,
String
accoutkitClientToken
)
{
public
static
boolean
initAccountKit
(
String
facebookAppId
,
String
appName
,
String
accoutkitClientToken
)
{
try
{
try
{
if
(
BuildConfig
.
FACEBOOK_APP_ID
.
equals
(
facebookAppId
)
&&
BuildConfig
.
ACCOUNT_KIT_CLIENT_TOKEN
.
equals
(
accoutkitClientToken
))
{
String
localAppId
=
StringDecrypt
.
uncodeString
(
BuildConfig
.
FACEBOOK_APP_ID
);
String
localClienToken
=
StringDecrypt
.
uncodeString
(
BuildConfig
.
ACCOUNT_KIT_CLIENT_TOKEN
);
if
(
localAppId
.
equals
(
facebookAppId
)
&&
localClienToken
.
equals
(
accoutkitClientToken
))
{
return
true
;
return
true
;
}
}
Class
clazz
=
AccountKitController
.
class
;
Class
clazz
=
AccountKitController
.
class
;
...
...
src/main/java/tech/starwin/utils/format_utils/StringDecrypt.java
View file @
bfe40ef5
...
@@ -24,7 +24,7 @@ public class StringDecrypt {
...
@@ -24,7 +24,7 @@ public class StringDecrypt {
String
value
=
text
.
split
(
FLAG
)[
1
];
String
value
=
text
.
split
(
FLAG
)[
1
];
value
=
new
String
(
Base64
.
decode
(
value
.
getBytes
(),
Base64
.
DEFAULT
));
value
=
new
String
(
Base64
.
decode
(
value
.
getBytes
(),
Base64
.
DEFAULT
));
if
(
value
.
startsWith
(
key
))
{
if
(
value
.
startsWith
(
key
))
{
value
=
value
.
replace
(
key
+
"#-#"
,
""
);
value
=
value
.
replace
(
key
+
FLAG
,
""
);
}
}
return
value
;
return
value
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment