Skip to content

Commit

Permalink
git ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
zjw committed Jun 3, 2020
1 parent 135eee4 commit 6aad7e2
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
.idea
56 changes: 28 additions & 28 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@ cmake_minimum_required(VERSION 3.4.1)
# Gradle automatically packages shared libraries with your APK.

add_library( # Sets the name of the library.
native-lib
native-lib


# Sets the library as a shared library.
SHARED
# Sets the library as a shared library.
SHARED

# Provides a relative path to your source file(s).
src/main/cpp/native-lib.cpp
)
# Provides a relative path to your source file(s).
src/main/cpp/native-lib.cpp
)

add_library( # Sets the name of the library.
encode-lib
encode-lib


# Sets the library as a shared library.
SHARED
# Sets the library as a shared library.
SHARED

# Provides a relative path to your source file(s).
src/main/cpp/aes.c
src/main/cpp/aes.h
src/main/cpp/base64.c
src/main/cpp/base64.h
src/main/cpp/JNIEncrypt.c
)
# Provides a relative path to your source file(s).
src/main/cpp/aes.c
src/main/cpp/aes.h
src/main/cpp/base64.c
src/main/cpp/base64.h
src/main/cpp/JNIEncrypt.c
)

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
Expand All @@ -43,24 +43,24 @@ add_library( # Sets the name of the library.
# completing its build.

find_library( # Sets the name of the path variable.
log-lib
log-lib

# Specifies the name of the NDK library that
# you want CMake to locate.
log )
# Specifies the name of the NDK library that
# you want CMake to locate.
log)

# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.

target_link_libraries( # Specifies the target library.
native-lib
# Links the target library to the log library
# included in the NDK.
${log-lib} )
native-lib
# Links the target library to the log library
# included in the NDK.
${log-lib})

target_link_libraries( # Specifies the target library.
encode-lib
# Links the target library to the log library
# included in the NDK.
${log-lib} )
encode-lib
# Links the target library to the log library
# included in the NDK.
${log-lib})
2 changes: 1 addition & 1 deletion app/src/main/cpp/valid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG,__VA_ARGS__)

//签名信息
const char *app_sha1="81BA0CF9134C6415F34C3BCC854913A53C71415E";
const char *app_sha1="F723DBC981112F4B39985717177B3F871435E920";
const char hexcode[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};

char* getSha1(JNIEnv *env, jobject context_object){
Expand Down
14 changes: 9 additions & 5 deletions app/src/main/java/com/example/ndk/ndkdemo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

Expand All @@ -19,11 +20,14 @@ protected void onCreate(Bundle savedInstanceState) {
TextView tv_show = (TextView) findViewById(R.id.tv_show);
tv_show.setText(SignHelper.getSign(this));

// if (SignHelper.getSignature(this).contains(SignHelper.getSign(this))) {
// System.out.println("成功");
// } else {
// System.out.println("失败");
// }
//是否二次打包
if (SignHelper.checkSha1(this)) {
System.out.println("没有被二次打包");
Toast.makeText(this,"没有被二次打包",Toast.LENGTH_LONG).show();
} else {
System.out.println("被二次打包了");
Toast.makeText(this,"被二次打包了",Toast.LENGTH_LONG).show();
}

String aesEncode = CyptoUtils.aesEncode("我会好好的");
System.out.println("加密后:" + aesEncode);
Expand Down

0 comments on commit 6aad7e2

Please sign in to comment.