Skip to content

Commit 841f7f1

Browse files
committed
[soter]1. change sotercore and soterwrapper to soter-core and soter-wrapper 2. change sample package name to com.tencent.soter.demo 3. add jcenter to allprojects dependency 4. remove application in soter sample
1 parent 12341d6 commit 841f7f1

File tree

94 files changed

+62
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+62
-70
lines changed

README.md

+2-2
File renamed without changes.

soter-client-demo/sotersampleapp/build.gradle soter-client-demo/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ android {
55
buildToolsVersion "25.0.2"
66

77
defaultConfig {
8-
applicationId "com.soterdemo.sotersampleapp"
8+
applicationId "com.tencent.soter.demo"
99
minSdkVersion 16
1010
targetSdkVersion 24
1111
versionCode 1
@@ -22,6 +22,6 @@ android {
2222

2323
dependencies {
2424
compile fileTree(dir: 'libs', include: ['*.jar'])
25-
compile 'com.tencent.soter:soterwrapper:1.3.1'
25+
compile 'com.tencent.soter:soter-wrapper:1.3.2'
2626
compile 'com.android.support:appcompat-v7:24.1.1'
2727
}

soter-client-demo/sotersampleapp/src/main/AndroidManifest.xml soter-client-demo/app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.soterdemo.sotersampleapp">
3+
package="com.tencent.soter.demo">
44

55
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
66
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

soter-client-demo/sotersampleapp/src/main/java/com/soterdemo/sotersampleapp/SoterDemoApplication.java soter-client-demo/app/src/main/java/com/tencent/soter/demo/SoterDemoApplication.java

+16-16
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp;
9+
package com.tencent.soter.demo;
1010

1111
import android.app.Application;
1212
import android.support.annotation.NonNull;
1313

14-
import com.soterdemo.sotersampleapp.model.ConstantsSoterDemo;
15-
import com.soterdemo.sotersampleapp.model.DemoLogger;
16-
import com.soterdemo.sotersampleapp.model.SoterDemoData;
17-
import com.soterdemo.sotersampleapp.net.RemoteGetSupportSoter;
18-
import com.soterdemo.sotersampleapp.net.RemoteUploadASK;
19-
import com.tencent.soter.core.model.ISoterLogger;
14+
import com.tencent.soter.demo.model.ConstantsSoterDemo;
15+
import com.tencent.soter.demo.model.DemoLogger;
16+
import com.tencent.soter.demo.model.SoterDemoData;
17+
import com.tencent.soter.demo.net.RemoteGetSupportSoter;
18+
import com.tencent.soter.demo.net.RemoteUploadASK;
2019
import com.tencent.soter.wrapper.SoterWrapperApi;
2120
import com.tencent.soter.wrapper.wrap_callback.SoterProcessCallback;
2221
import com.tencent.soter.wrapper.wrap_callback.SoterProcessKeyPreparationResult;
@@ -50,8 +49,8 @@ public void onResult(@NonNull SoterProcessKeyPreparationResult result) {
5049
}
5150
};
5251

53-
// 建议在SoterDemoApplication中获取应用是否支持Soter
54-
// 如果不立刻进行网络操作,可以暂时不设置网络回调,这样SOTER将不会联网检查是否支持SOTER
52+
// 建议在 SoterDemoApplication 中获取应用是否支持 SOTER
53+
// 如果不立刻进行网络操作,可以暂时不设置网络回调,这样 SOTER将不会联网检查是否支持SOTER
5554
@Override
5655
public void onCreate() {
5756
super.onCreate();
@@ -61,14 +60,15 @@ public void onCreate() {
6160
}
6261

6362
private void checkIsSupport() {
64-
// init的时机有多种情况,应用方可以自己选择。如果多账号共享同一个密钥的话,则只需要在Application的onCreate中初始化;如果需要切换账户,则在账户登录成功之后初始化。如果需要
65-
// 不同账户不共享密钥,则需要填入区分不同账户的字符串setDistinguishSalt,比如账户名。正常情况下,没有特殊需求,不用调用setCustomAppSecureKeyName。此接口仅仅作为前期已经接入
66-
// 如果有自己的log实现,可以将实现通过setSoterLogger接口写入
63+
// init 的时机有多种情况,应用方可以自己选择。如果多账号共享同一个密钥的话,则只需要在 Application 的 onCreate 中初始化;如果需要切换账户,则在账户登录成功之后初始化。如果需要
64+
// 不同账户不共享密钥,则需要填入区分不同账户的字符串 setDistinguishSalt,比如账户名。正常情况下,没有特殊需求,不用调用 setCustomAppSecureKeyName。此接口仅仅作为前期已经接入
65+
// 如果有自己的log实现,可以将实现通过 setSoterLogger 接口写入
6766
InitializeParam param = new InitializeParam.InitializeParamBuilder().setGetSupportNetWrapper(new RemoteGetSupportSoter()).setScenes(ConstantsSoterDemo.SCENE_PAYMENT)
68-
/*.setCustomAppSecureKeyName("Wechat_demo_ask").setDistinguishSalt("demo_salt_account_1").setSoterLogger(new ISoterLogger() {
69-
...
70-
}
71-
)*/.build();
67+
68+
// .setCustomAppSecureKeyName("Wechat_demo_ask")
69+
// .setDistinguishSalt("demo_salt_account_1")
70+
// .setSoterLogger(new ISoterLogger() {...})
71+
.build();
7272
SoterWrapperApi.init(getApplicationContext(), mGetIsSupportCallback, param);
7373
}
7474

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.model;
9+
package com.tencent.soter.demo.model;
1010

1111
import android.os.Environment;
1212

soter-client-demo/sotersampleapp/src/main/java/com/soterdemo/sotersampleapp/model/DemoLogger.java soter-client-demo/app/src/main/java/com/tencent/soter/demo/model/DemoLogger.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.model;
9+
package com.tencent.soter.demo.model;
1010

1111
import android.util.Log;
1212

soter-client-demo/sotersampleapp/src/main/java/com/soterdemo/sotersampleapp/model/DemoUtil.java soter-client-demo/app/src/main/java/com/tencent/soter/demo/model/DemoUtil.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,12 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.model;
9+
package com.tencent.soter.demo.model;
1010

1111
import java.io.File;
12-
import java.io.FileNotFoundException;
1312
import java.io.FileOutputStream;
1413
import java.io.FileWriter;
1514
import java.io.IOException;
16-
import java.io.OutputStreamWriter;
17-
import java.io.StringWriter;
18-
import java.nio.ByteBuffer;
19-
import java.nio.CharBuffer;
20-
import java.nio.charset.Charset;
2115
import java.security.MessageDigest;
2216
import java.security.NoSuchAlgorithmException;
2317

soter-client-demo/sotersampleapp/src/main/java/com/soterdemo/sotersampleapp/model/SoterDemoData.java soter-client-demo/app/src/main/java/com/tencent/soter/demo/model/SoterDemoData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.model;
9+
package com.tencent.soter.demo.model;
1010

1111
import android.content.Context;
1212
import android.support.annotation.NonNull;

soter-client-demo/sotersampleapp/src/main/java/com/soterdemo/sotersampleapp/net/DemoNetworkThread.java soter-client-demo/app/src/main/java/com/tencent/soter/demo/net/DemoNetworkThread.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

1111
import android.os.Handler;
1212
import android.os.HandlerThread;
+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

1111
import android.support.annotation.NonNull;
1212
import android.util.Base64;
1313

14-
import com.soterdemo.sotersampleapp.model.ConstantsSoterDemo;
15-
import com.soterdemo.sotersampleapp.model.DemoUtil;
14+
import com.tencent.soter.demo.model.ConstantsSoterDemo;
15+
import com.tencent.soter.demo.model.DemoUtil;
1616
import com.tencent.soter.wrapper.wrap_net.ISoterNetCallback;
1717
import com.tencent.soter.wrapper.wrap_net.IWrapUploadSignature;
1818

soter-client-demo/sotersampleapp/src/main/java/com/soterdemo/sotersampleapp/net/RemoteBase.java soter-client-demo/app/src/main/java/com/tencent/soter/demo/net/RemoteBase.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

11-
import com.soterdemo.sotersampleapp.model.DemoLogger;
11+
import com.tencent.soter.demo.model.DemoLogger;
1212

1313
import org.json.JSONObject;
1414

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

1111
import android.support.annotation.NonNull;
1212

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

1111
import android.support.annotation.NonNull;
1212

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

1111
import android.support.annotation.NonNull;
1212

soter-client-demo/sotersampleapp/src/main/java/com/soterdemo/sotersampleapp/net/RemoteUploadASK.java soter-client-demo/app/src/main/java/com/tencent/soter/demo/net/RemoteUploadASK.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

1111
import android.support.annotation.NonNull;
1212
import android.util.Base64;
1313

14-
import com.soterdemo.sotersampleapp.model.ConstantsSoterDemo;
15-
import com.soterdemo.sotersampleapp.model.DemoUtil;
14+
import com.tencent.soter.demo.model.ConstantsSoterDemo;
15+
import com.tencent.soter.demo.model.DemoUtil;
1616
import com.tencent.soter.wrapper.wrap_net.ISoterNetCallback;
1717
import com.tencent.soter.wrapper.wrap_net.IWrapUploadKeyNet;
1818

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

1111
import android.support.annotation.NonNull;
1212
import android.util.Base64;
1313

14-
import com.soterdemo.sotersampleapp.model.ConstantsSoterDemo;
15-
import com.soterdemo.sotersampleapp.model.DemoUtil;
14+
import com.tencent.soter.demo.model.ConstantsSoterDemo;
15+
import com.tencent.soter.demo.model.DemoUtil;
1616
import com.tencent.soter.wrapper.wrap_net.ISoterNetCallback;
1717
import com.tencent.soter.wrapper.wrap_net.IWrapUploadKeyNet;
1818

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.net;
9+
package com.tencent.soter.demo.net;
1010

1111
import org.json.JSONException;
1212
import org.json.JSONObject;

soter-client-demo/sotersampleapp/src/main/java/com/soterdemo/sotersampleapp/ui/SoterDemoUI.java soter-client-demo/app/src/main/java/com/tencent/soter/demo/ui/SoterDemoUI.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
77
*/
88

9-
package com.soterdemo.sotersampleapp.ui;
9+
package com.tencent.soter.demo.ui;
1010

1111
import android.Manifest;
1212
import android.annotation.SuppressLint;
@@ -32,17 +32,17 @@
3232
import android.widget.TextView;
3333
import android.widget.Toast;
3434

35-
import com.soterdemo.sotersampleapp.R;
36-
import com.soterdemo.sotersampleapp.model.ConstantsSoterDemo;
37-
import com.soterdemo.sotersampleapp.model.DemoLogger;
38-
import com.soterdemo.sotersampleapp.model.DemoUtil;
39-
import com.soterdemo.sotersampleapp.model.SoterDemoData;
40-
import com.soterdemo.sotersampleapp.net.RemoteAuthentication;
41-
import com.soterdemo.sotersampleapp.net.RemoteGetChallengeStr;
42-
import com.soterdemo.sotersampleapp.net.RemoteOpenFingerprintPay;
43-
import com.soterdemo.sotersampleapp.net.RemoteUploadASK;
44-
import com.soterdemo.sotersampleapp.net.RemoteUploadPayAuthKey;
4535
import com.tencent.soter.core.SoterCore;
36+
import com.tencent.soter.demo.R;
37+
import com.tencent.soter.demo.model.ConstantsSoterDemo;
38+
import com.tencent.soter.demo.model.DemoLogger;
39+
import com.tencent.soter.demo.model.DemoUtil;
40+
import com.tencent.soter.demo.model.SoterDemoData;
41+
import com.tencent.soter.demo.net.RemoteAuthentication;
42+
import com.tencent.soter.demo.net.RemoteGetChallengeStr;
43+
import com.tencent.soter.demo.net.RemoteOpenFingerprintPay;
44+
import com.tencent.soter.demo.net.RemoteUploadASK;
45+
import com.tencent.soter.demo.net.RemoteUploadPayAuthKey;
4646
import com.tencent.soter.wrapper.SoterWrapperApi;
4747
import com.tencent.soter.wrapper.wrap_callback.SoterProcessAuthenticationResult;
4848
import com.tencent.soter.wrapper.wrap_callback.SoterProcessCallback;

soter-client-demo/build.gradle

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ buildscript {
22
repositories {
33
mavenLocal()
44
jcenter()
5-
// maven {
6-
// url 'https://dl.bintray.com/tencent-soter/maven/'
7-
// }
85
}
96
dependencies {
107
classpath 'com.android.tools.build:gradle:2.3.0'
@@ -16,6 +13,7 @@ buildscript {
1613
allprojects {
1714
repositories {
1815
mavenLocal()
16+
jcenter()
1917
}
2018

2119
tasks.withType(Javadoc).all {

soter-client-demo/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':sotersampleapp', ':Application'
1+
include ':app'

soter-client-sdk/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1414
# org.gradle.parallel=true
1515
#Tue May 09 20:42:37 CST 2017
16-
VERSION_NAME_PREFIX=1.3.1
16+
VERSION_NAME_PREFIX=1.3.2
1717
VERSION_NAME_SUFFIX=
1818
#VERSION_NAME_SUFFIX=-SNAPSHOT

soter-client-sdk/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':sotercore', ':soterwrapper'
1+
include ':soter-core', ':soter-wrapper'
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
POM_NAME=soter-core
2+
POM_ARTIFACT_ID=soter-core

soter-client-sdk/sotercore/src/main/java/com/tencent/soter/core/model/ConstantsSoter.java soter-client-sdk/soter-core/src/main/java/com/tencent/soter/core/model/ConstantsSoter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ public interface ConstantsSoter {
2424
/**
2525
* The authentication is frozen due to too many failures
2626
*/
27-
//fingerprint anti brute force
27+
//fingerprint anti brute force. We use 10308 to distinguish some bad implementation which will return 7 in non-predicted situations
2828
int ERR_FINGERPRINT_FAIL_MAX = 10308; //FingerprintManager.FINGERPRINT_ERROR_LOCKOUT = 7;
2929
}

soter-client-sdk/soterwrapper/build.gradle soter-client-sdk/soter-wrapper/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ android {
2424

2525
dependencies {
2626
compile fileTree(dir: 'libs', include: ['*.jar'])
27-
compile project(":sotercore")
27+
compile project(':soter-core')
2828
compile 'com.android.support:support-annotations:24.1.1'
2929
}
3030

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
POM_NAME=soter-wrapper
2+
POM_ARTIFACT_ID=soter-wrapper

soter-client-sdk/sotercore/gradle.properties

-2
This file was deleted.

soter-client-sdk/soterwrapper/gradle.properties

-2
This file was deleted.

0 commit comments

Comments
 (0)