@digitalshieldfe/react-native-backup-card-sdk 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -25
- package/android/build.gradle +49 -4
- package/android/consumer-rules.pro +0 -0
- package/android/proguard-rules.pro +21 -0
- package/android/src/main/AndroidManifest.xml +4 -1
- package/android/src/main/java/com/ziancube/backupcardsdk/BackupCardSdk.kt +478 -0
- package/android/src/main/java/com/ziancube/backupcardsdk/GPChannelNatives.java +41 -0
- package/android/src/main/java/com/ziancube/backupcardsdk/listener/ApiAsyncListener.java +13 -0
- package/android/src/main/java/com/ziancube/backupcardsdk/nfc/ApiNfc.java +173 -0
- package/android/src/main/java/com/ziancube/backupcardsdk/nfc/ImplNfc.java +39 -0
- package/android/src/main/java/com/ziancube/backupcardsdk/nfc/NfcComm.java +115 -0
- package/android/src/main/java/com/ziancube/backupcardsdk/utils/ApduParam.java +67 -0
- package/android/src/main/java/com/ziancube/backupcardsdk/utils/CommList.java +41 -0
- package/android/src/main/java/com/ziancube/backupcardsdk/utils/Utils.java +109 -0
- package/android/src/main/jni/CMakeLists.txt +60 -0
- package/android/src/main/jni/GPChannel/include/GPChannelSDK.h +306 -0
- package/android/src/main/jni/GPChannel/include/context/BaseContext.h +56 -0
- package/android/src/main/jni/GPChannel/include/device/ApduBuilder.hpp +72 -0
- package/android/src/main/jni/GPChannel/include/utility/Apdu.hpp +166 -0
- package/android/src/main/jni/GPChannel/include/utility/Debug.hpp +59 -0
- package/android/src/main/jni/GPChannel/include/utility/Singleton.h +34 -0
- package/android/src/main/jni/GPChannel/include/utility/mutex.h +24 -0
- package/android/src/main/jni/GPChannel/include/utility/trim.hpp +155 -0
- package/android/src/main/jni/GPChannel/include/utility/util.h +104 -0
- package/android/src/main/jni/GPChannel/include/utility/xFactory.hpp +26 -0
- package/android/src/main/jni/GPChannel/include/utility/xManager.hpp +84 -0
- package/android/src/main/jni/GPChannel/src/arm64-v8a/libJUB_GPC_APDU_SDK.a +0 -0
- package/android/src/main/jni/GPChannel/src/arm64-v8a/libTrezorCrypto.a +0 -0
- package/android/src/main/jni/GPChannel/src/armeabi-v7a/libJUB_GPC_APDU_SDK.a +0 -0
- package/android/src/main/jni/GPChannel/src/armeabi-v7a/libTrezorCrypto.a +0 -0
- package/android/src/main/jni/GPChannel/src/x86/libJUB_GPC_APDU_SDK.a +0 -0
- package/android/src/main/jni/GPChannel/src/x86/libTrezorCrypto.a +0 -0
- package/android/src/main/jni/src/implJni.cpp +313 -0
- package/android/src/main/jni/src/implJni.h +9 -0
- package/android/src/main/jni/utils/jsoncpp/AUTHORS +111 -0
- package/android/src/main/jni/utils/jsoncpp/CMakeLists.txt +159 -0
- package/android/src/main/jni/utils/jsoncpp/LICENSE +55 -0
- package/android/src/main/jni/utils/jsoncpp/README.md +135 -0
- package/android/src/main/jni/utils/jsoncpp/amalgamate.py +155 -0
- package/android/src/main/jni/utils/jsoncpp/appveyor.yml +22 -0
- package/android/src/main/jni/utils/jsoncpp/dev.makefile +35 -0
- package/android/src/main/jni/utils/jsoncpp/devtools/__init__.py +6 -0
- package/android/src/main/jni/utils/jsoncpp/devtools/agent_vmw7.json +33 -0
- package/android/src/main/jni/utils/jsoncpp/devtools/agent_vmxp.json +26 -0
- package/android/src/main/jni/utils/jsoncpp/devtools/antglob.py +205 -0
- package/android/src/main/jni/utils/jsoncpp/devtools/batchbuild.py +278 -0
- package/android/src/main/jni/utils/jsoncpp/devtools/fixeol.py +70 -0
- package/android/src/main/jni/utils/jsoncpp/devtools/licenseupdater.py +94 -0
- package/android/src/main/jni/utils/jsoncpp/devtools/tarball.py +52 -0
- package/android/src/main/jni/utils/jsoncpp/doxybuild.py +189 -0
- package/android/src/main/jni/utils/jsoncpp/include/CMakeLists.txt +2 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/allocator.h +98 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/assertions.h +54 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/autolink.h +25 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/config.h +187 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/features.h +61 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/forwards.h +37 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/json.h +15 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/reader.h +411 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/value.h +888 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/version.h +20 -0
- package/android/src/main/jni/utils/jsoncpp/include/json/writer.h +357 -0
- package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/jsontest.vcproj +119 -0
- package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/lib_json.vcproj +205 -0
- package/android/src/main/jni/utils/jsoncpp/makefiles/vs71/test_lib_json.vcproj +130 -0
- package/android/src/main/jni/utils/jsoncpp/makerelease.py +390 -0
- package/android/src/main/jni/utils/jsoncpp/meson.build +103 -0
- package/android/src/main/jni/utils/jsoncpp/pkg-config/jsoncpp.pc.in +9 -0
- package/android/src/main/jni/utils/jsoncpp/src/CMakeLists.txt +5 -0
- package/android/src/main/jni/utils/jsoncpp/src/jsontestrunner/CMakeLists.txt +25 -0
- package/android/src/main/jni/utils/jsoncpp/src/jsontestrunner/main.cpp +333 -0
- package/android/src/main/jni/utils/jsoncpp/src/lib_json/CMakeLists.txt +117 -0
- package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_reader.cpp +2060 -0
- package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_tool.h +114 -0
- package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_value.cpp +1661 -0
- package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_valueiterator.inl +167 -0
- package/android/src/main/jni/utils/jsoncpp/src/lib_json/json_writer.cpp +1233 -0
- package/android/src/main/jni/utils/jsoncpp/src/lib_json/version.h.in +20 -0
- package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/CMakeLists.txt +38 -0
- package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/jsontest.cpp +457 -0
- package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/jsontest.h +286 -0
- package/android/src/main/jni/utils/jsoncpp/src/test_lib_json/main.cpp +2606 -0
- package/android/src/main/jni/utils/jsoncpp/travis.sh +23 -0
- package/android/src/main/jni/utils/jsoncpp/version +1 -0
- package/android/src/main/jni/utils/jsoncpp/version.in +1 -0
- package/android/src/main/jni/utils/logUtils.cpp +108 -0
- package/android/src/main/jni/utils/logUtils.h +87 -0
- package/android/src/main/jni/utils/mSIGNA/stdutils/uchar_vector.h +614 -0
- package/package.json +2 -3
- package/android/libs/backupcardsdk-1.0.0.aar +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# This is called by `.travis.yml` via Travis CI.
|
|
3
|
+
# Travis supplies $TRAVIS_OS_NAME.
|
|
4
|
+
# http://docs.travis-ci.com/user/multi-os/
|
|
5
|
+
# Our .travis.yml also defines:
|
|
6
|
+
# - SHARED_LIB=ON/OFF
|
|
7
|
+
# - STATIC_LIB=ON/OFF
|
|
8
|
+
# - CMAKE_PKG=ON/OFF
|
|
9
|
+
# - BUILD_TYPE=release/debug
|
|
10
|
+
# - VERBOSE_MAKE=false/true
|
|
11
|
+
# - VERBOSE (set or not)
|
|
12
|
+
|
|
13
|
+
# -e: fail on error
|
|
14
|
+
# -v: show commands
|
|
15
|
+
# -x: show expanded commands
|
|
16
|
+
set -vex
|
|
17
|
+
|
|
18
|
+
env | sort
|
|
19
|
+
|
|
20
|
+
meson --buildtype ${BUILD_TYPE} --default-library ${LIB_TYPE} . build-${LIB_TYPE}
|
|
21
|
+
ninja -v -C build-${LIB_TYPE}
|
|
22
|
+
ninja -v -C build-${LIB_TYPE} test
|
|
23
|
+
rm -r build-${LIB_TYPE}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.8.4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@JSONCPP_VERSION@
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by GOD on 2017/4/20.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
#include <logUtils.h>
|
|
6
|
+
#include <android/log.h>
|
|
7
|
+
|
|
8
|
+
void LogString(int pro, const char *szFormat, ...)
|
|
9
|
+
{
|
|
10
|
+
__android_log_print(pro, "JuBiter", "%s", szFormat);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// log.h 中说明单次最大日志是1023 个字符
|
|
14
|
+
void LogBinary(const char* msg, const unsigned char *pBuf, unsigned long ulSize)
|
|
15
|
+
{
|
|
16
|
+
LogString(ANDROID_LOG_INFO, msg);
|
|
17
|
+
|
|
18
|
+
// Show 16 bytes each line.
|
|
19
|
+
char ss[4096] = {0};
|
|
20
|
+
|
|
21
|
+
unsigned long ulLines = ulSize / 16;
|
|
22
|
+
unsigned long ulCharInLastLine = 0;
|
|
23
|
+
if(0 != ulSize % 16)
|
|
24
|
+
{
|
|
25
|
+
ulCharInLastLine = ulSize - ulLines * 16;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
unsigned long i = 0;
|
|
29
|
+
unsigned long j = 0;
|
|
30
|
+
for(i = 0; i < ulLines; ++i)
|
|
31
|
+
{
|
|
32
|
+
memset(ss, 0, sizeof(ss));
|
|
33
|
+
sprintf(&ss[strlen(ss)], " ");
|
|
34
|
+
|
|
35
|
+
// 显示16进制
|
|
36
|
+
for(j = 0; j < 16; ++j)
|
|
37
|
+
{
|
|
38
|
+
sprintf(&ss[strlen(ss)], "%02X ", (unsigned short) pBuf[16 * i + j]);
|
|
39
|
+
|
|
40
|
+
if(7 == j)
|
|
41
|
+
{
|
|
42
|
+
sprintf(&ss[strlen(ss)], "- ");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
sprintf(&ss[strlen(ss)], " ");
|
|
47
|
+
|
|
48
|
+
// 显示字符
|
|
49
|
+
for(j = 0; j < 16; ++j)
|
|
50
|
+
{
|
|
51
|
+
if(isprint(pBuf[16 * i + j]))
|
|
52
|
+
{
|
|
53
|
+
sprintf(&ss[strlen(ss)], "%c", (char) pBuf[16 * i + j]);
|
|
54
|
+
}
|
|
55
|
+
else
|
|
56
|
+
{
|
|
57
|
+
sprintf(&ss[strlen(ss)], ".");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
LogString(ANDROID_LOG_INFO, ss);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if(0 != ulCharInLastLine)
|
|
64
|
+
{
|
|
65
|
+
memset(ss, 0, sizeof(ss));
|
|
66
|
+
sprintf(ss, " ");
|
|
67
|
+
|
|
68
|
+
for(j = 0; j < ulCharInLastLine; ++j)
|
|
69
|
+
{
|
|
70
|
+
sprintf(&ss[strlen(ss)], "%02X ", (unsigned short) pBuf[16 * i + j]);
|
|
71
|
+
|
|
72
|
+
if(j == 7 && ulCharInLastLine > 8)
|
|
73
|
+
{
|
|
74
|
+
sprintf(&ss[strlen(ss)], "- ");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
unsigned long k = 0;
|
|
79
|
+
|
|
80
|
+
k += ((16 - ulCharInLastLine) * 3);
|
|
81
|
+
|
|
82
|
+
if(ulCharInLastLine <= 8)
|
|
83
|
+
{
|
|
84
|
+
k += 2;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
for(unsigned long kk = 0; kk < k; ++kk)
|
|
88
|
+
{
|
|
89
|
+
sprintf(&ss[strlen(ss)], " ");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
sprintf(&ss[strlen(ss)], " ");
|
|
93
|
+
|
|
94
|
+
for(j = 0; j < ulCharInLastLine; ++j)
|
|
95
|
+
{
|
|
96
|
+
if(isprint(pBuf[16 * i + j]))
|
|
97
|
+
{
|
|
98
|
+
sprintf(&ss[strlen(ss)], "%c", (char) pBuf[16 * i + j]);
|
|
99
|
+
}
|
|
100
|
+
else
|
|
101
|
+
{
|
|
102
|
+
sprintf(&ss[strlen(ss)], ".");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
LogString(ANDROID_LOG_INFO, ss);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by GOD on 2017/4/20.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
#ifndef _LOGUTILS_H
|
|
6
|
+
#define _LOGUTILS_H
|
|
7
|
+
|
|
8
|
+
#include <time.h>
|
|
9
|
+
#include <stdio.h>
|
|
10
|
+
#include <cstring>
|
|
11
|
+
#include <ctype.h>
|
|
12
|
+
|
|
13
|
+
//#ifdef ANDROID_API_LEVEL_H
|
|
14
|
+
#ifdef __ANDROID__
|
|
15
|
+
|
|
16
|
+
#include <jni.h>
|
|
17
|
+
#include <android/log.h>
|
|
18
|
+
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
//**************************************************************************************************
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 字符串输出
|
|
25
|
+
* @param pro
|
|
26
|
+
* @param szLog
|
|
27
|
+
*/
|
|
28
|
+
void LogString(int pro, const char *szLog, ...);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 16 进制输出
|
|
32
|
+
* @param msg
|
|
33
|
+
* @param pBuf
|
|
34
|
+
* @param ulSize
|
|
35
|
+
*/
|
|
36
|
+
void LogBinary(const char* msg, const unsigned char *pBuf, unsigned long ulSize);
|
|
37
|
+
|
|
38
|
+
//**************************************************************************************************
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
#if defined(DEBUG)
|
|
42
|
+
|
|
43
|
+
//#ifdef ANDROID_API_LEVEL_H
|
|
44
|
+
#ifdef __ANDROID__
|
|
45
|
+
|
|
46
|
+
#define TAG "JuBiter"
|
|
47
|
+
#define PRINTV(...) { __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__); }
|
|
48
|
+
#define PRINTD(...) { __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__); }
|
|
49
|
+
#define PRINTI(...) { __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__); }
|
|
50
|
+
#define PRINTW(...) { __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__); }
|
|
51
|
+
#define PRINTE(...) { __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__); }
|
|
52
|
+
|
|
53
|
+
#else
|
|
54
|
+
|
|
55
|
+
#define PRINTE(...) printf(__VA_ARGS__);
|
|
56
|
+
#define PRINTW(...) printf(__VA_ARGS__);
|
|
57
|
+
#define PRINTI(...) printf(__VA_ARGS__);
|
|
58
|
+
|
|
59
|
+
#endif /* __ANDROID__ */
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
#define LOG_ERR(...) { \
|
|
63
|
+
PRINTE(__VA_ARGS__); \
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#define LOG_WRN(...) { \
|
|
67
|
+
PRINTW(__VA_ARGS__) \
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#define LOG_INF(...) { \
|
|
71
|
+
PRINTI(__VA_ARGS__); \
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
#define LOG_BIN(msg, src, len) { \
|
|
75
|
+
LogBinary(msg, src, len); \
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
#else
|
|
79
|
+
|
|
80
|
+
#define LOG_ERR(...)
|
|
81
|
+
#define LOG_WRN(...)
|
|
82
|
+
#define LOG_INF(...)
|
|
83
|
+
#define LOG_BIN(...)
|
|
84
|
+
|
|
85
|
+
#endif /* DEBUG */
|
|
86
|
+
|
|
87
|
+
#endif //_LOGUTILS_H
|