Providing a simple way to keep your secure info safe for android app development.
All the key-values will be auto package into a native library during the compile time. Then your can obtain them from the Java interface generated by Cipher.so.
- Encrypt secure info in a native library via easy configs
- Reflection free
Add maven { url 'https://jitpack.io' }
resposity and classpath 'com.github.MEiDIK:Cipher.so:dev-SNAPSHOT'
dependency into the buildscript:
buildscript {
repositories {
google()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.github.MEiDIK:Cipher.so:dev-SNAPSHOT'
}
}
Add apply plugin:'cipher.so'
before(VERY IMPORTANT) apply plugin: 'com.android.application'
apply plugin: 'cipher.so'
apply plugin: 'com.android.application'
That's all, Cipher.so is ready to GO.
In your app module build.gradle, add the follow-like configs to save key-values.
cipher.so {
keys {
hello {
value = 'Hello From Cipher.so😊'
}
httpsKey {
value = 'htkdjfkj@https2017now'
}
数据库密码 {
value = '今天天气不错😂😂'
}
...
}
encryptSeed = 'HelloSecretKey' //Secret key used for encryption
}
Then Rebuild to generate the Java Interface.
String hello = CipherClient.hello();
String httpsKey = CipherClient.httpsKey();
String dbKey = CipherClient.数据库密码();
Sample: HelloCipherSo
I am very glad for your contributes. Let's make this job awesome.
Here is the contribute workflow from github: Contribute Guide
Encrypt data in .so-lib- Prevent dynamic attacks
Check Signature- More
- Support different Application varients
在编译期,通过gradle配置将Key-value加密打包进native so库,然后通过自动生成的Java接口可以获取相应的数据。
- 通过简单的配置把隐私信息加密进native库
- 没有使用反射
在buildscript中添加仓库maven { url 'https://jitpack.io' }
,添加依赖classpath 'com.github.MEiDIK:Cipher.so:dev-SNAPSHOT'
:
buildscript {
repositories {
google()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.github.MEiDIK:Cipher.so:dev-SNAPSHOT'
}
}
在apply plugin: 'com.android.application'
前(十分重要)添加apply plugin:'cipher.so'
apply plugin: 'cipher.so'
apply plugin: 'com.android.application'
至此,Cipher.so已经就绪。
在app模块的build.gradle中,通过以下的配置保存key-value值。
cipher.so {
keys {
hello {
value = 'Hello From Cipher.so😊'
}
httpsKey {
value = 'htkdjfkj@https2017now'
}
数据库密码 {
value = '今天天气不错😂😂'
}
...
}
encryptSeed = 'HelloSecretKey' //用于加密的密钥
}
然后Rebuild一下,自动生产Java的调用接口。
String hello = CipherClient.hello();
String httpsKey = CipherClient.httpsKey();
String dbKey = CipherClient.数据库密码();
例子: HelloCipherSo
十分欢迎你的贡献,让我们一起把这个做得更好。
这是Github的贡献指南: Contribute Guide
在.so-lib中加密数据- 防止动态攻击
检查应用 签名- 更多
- 支持Multi Application varients
Copyright 2017 认真的帅斌
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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.