卸载已安装的sqlcipher并安装gcc和openssl:
apt remove sqlcipher &&
apt install gcc openssl
下载编译安装tcl:
https://www.tcl.tk/software/tcltk/download.html
wget http://prdownloads.sourceforge.net/tcl/tcl8.6.13-src.tar.gz &&
tar -xvzf tcl8.6.13-src.tar.gz &&
cd tcl8.6.13/unix &&
./configure --prefix=/user/local/tcl &&
make && make install &&
ln -s /user/local/tcl/bin/tclsh8.6 /bin/tclsh
下载编译安装sqlcipher:
https://github.com/sqlcipher/sqlcipher/tags
https://github.com/sqlcipher/sqlcipher/archive/refs/tags/v4.5.5.tar.gz
tar -xvzf v4.5.5.tar.gz &&
cd sqlcipher-4.5.5 &&
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto" --disable-tcl &&
make && make install
使用方法:
sqlcipher EnMicroMsg.db "PRAGMA KEY='密码';PRAGMA cipher_use_hmac = OFF;PRAGMA cipher_page_size = 1024;PRAGMA kdf_iter = 4000;PRAGMA cipher_hmac_algorithm = HMAC_SHA1;PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1;select count(1) from sqlite_master;"