Giter Club home page Giter Club logo

android_sqlciphe's Introduction

android_sqlcipher

克隆代码

git clone https://github.com/blogercn/android_sqlciphe.git

进入工作目录

cd jni

设置你的NDK路径

export PATH=$PATH:/Users/jiazhiguo/Library/Android/sdk/ndk/25.0.8775105/

执行命令

ndk-build 这个命令有一些参数可以帮助我们编译,比如指定目录,指定Application.mk路径,指定android.mk路径,感觉除了android.mk文件,其他变量都可以指定: ndk-build NDK_PROJECT_PATH=.
NDK_APPLICATION_MK=Application.mk APP_BUILD_SCRIPT := $(LOCAL_PATH)/Android.mk

生成so库

在项目中应用

const char* pwd = "abcdefg";
result = sqlite3_open(path, &db);

if (result == SQLITE_OK)
    cout << "打开数据库成功" << endl;
else
    cout << "打开数据库失败" << endl;

result = sqlite3_key(db, pwd, strnlen(pwd, 1000));
cout << "指定数据库密码:" << result << endl;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.