8000 Converted readme to valid markdown · githubzhaoliang/sqlcipher@4ed2401 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ed2401

Browse files
thelfensdrferdevelopernotes
authored andcommitted
Converted readme to valid markdown
1 parent 4e3ffe8 commit 4ed2401

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

README.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
== SQLCipher ==
1+
## SQLCipher
22

33
SQLCipher is an SQLite extension that provides transparent 256-bit AES encryption of
44
database files. Pages are encrypted before being written to disk and are decrypted
@@ -11,7 +11,7 @@ SQLCipher was initially developed by Stephen Lombardo at Zetetic LLC
1111
(sjlombardo@zetetic.net) as the encrypted database layer for Strip,
1212
an iPhone data vault and password manager (http://getstrip.com).
1313

14-
[Features]
14+
## Features
1515

1616
- Fast performance with as little as 5-15% overhead for encryption on many operations
1717
- 100% of data in the database file is encrypted
@@ -20,7 +20,7 @@ an iPhone data vault and password manager (http://getstrip.com).
2020
- Algorithms provided by the peer reviewed OpenSSL crypto library.
2121
- Configurable crypto providers
2222

23-
[Compiling]
23+
## Compiling
2424

2525
Building SQLCipher is almost the same as compiling a regular version of
2626
SQLite with two small exceptions:
@@ -30,57 +30,56 @@ SQLite with two small exceptions:
3030

3131
Example Static linking (replace /opt/local/lib with the path to libcrypto.a)
3232

33-
$ ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" \
34-
LDFLAGS="/opt/local/lib/libcrypto.a"
35-
$ make
33+
$ ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_C 8000 ODEC" \
34+
LDFLAGS="/opt/local/lib/libcrypto.a"
35+
$ make
3636

3737
Example Dynamic linking
3838

39-
$ ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" \
40-
LDFLAGS="-lcrypto"
41-
$ make
39+
$ ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" \
40+
LDFLAGS="-lcrypto"
41+
$ make
4242

43-
[Encrypting a database]
43+
## Encrypting a database
4444

4545
To specify an encryption passphrase for the database via the SQL interface you
4646
use a pragma. The passphrase you enter is passed through PBKDF2 key derivation to
4747
obtain the encryption key for the database
4848

49-
PRAGMA key = 'passphrase';
49+
PRAGMA key = 'passphrase';
5050

5151
Alternately, you can specify an exact byte sequence using a blob literal. If you
5252< 8000 code class="diff-text syntax-highlighted-line">
use this method it is your responsibility to ensure that the data you provide a
5353
64 character hex string, which will be converted directly to 32 bytes (256 bits) of
5454
key data without key derivation.
5555

56-
PRAGMA key = "x'2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99'";
56+
PRAGMA key = "x'2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99'";
5757

5858
To encrypt a database programatically you can use the sqlite3_key function.
5959
The data provided in pKey is converted to an encryption key according to the
6060
same rules as PRAGMA key.
6161

62-
63-
int sqlite3_key(sqlite3 *db, const void *pKey, int nKey);
62+
int sqlite3_key(sqlite3 *db, const void *pKey, int nKey);
6463

6564
PRAGMA key or sqlite3_key should be called as the first operation when a database is open.
6665

67-
[Changing a database key]
66+
## Changing a database key
6867

6968
To change the encryption passphrase for an existing database you may use the rekey pragma
7069
after you've supplied the correct database password;
7170

72-
PRAGMA key = 'passphrase'; -- start with the existing database passphrase
73-
PRAGMA rekey = 'new-passphrase'; -- rekey will reencrypt with the new passphrase
71+
PRAGMA key = 'passphrase'; -- start with the existing database passphrase
72+
PRAGMA rekey = 'new-passphrase'; -- rekey will reencrypt with the new passphrase
7473

7574
The hexrekey pragma may be used to rekey to a specific binary value
7675

77-
PRAGMA rekey = "x'2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99'";
76+
PRAGMA rekey = "x'2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99'";
7877

7978
This can be accomplished programtically by using sqlite3_rekey;
8079

81-
sqlite3_rekey(sqlite3 *db, const void *pKey, int nKey)
80+
sqlite3_rekey(sqlite3 *db, const void *pKey, int nKey)
8281

83-
[Support]
82+
## Support
8483

8584
The primary avenue for support and discussions is the SQLCipher users mailing list:
8685

@@ -97,7 +96,7 @@ posts about SQLCipher as we do not monitor them frequently.
9796
If you are using SQLCipher in your own software please let us know at
9897
support@zetetic.net!
9998

100-
[License]
99+## License
101100

102101
Copyright (c) 2008, ZETETIC LLC
103102
All rights reserved.
@@ -128,7 +127,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
128127

129128
This directory contains source code to
130129

131-
SQLite: An Embeddable SQL Database Engine
130+
SQLite: An Embeddable SQL Database Engine
132131

133132
To compile the project, first create a directory in which to place
134133
the build products. It is recommended, but not required, that the
@@ -138,7 +137,7 @@ script found at the root of the source tree. Then run "make".
138137

139138
For example:
140139

141-
tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite"
140+
tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite"
142141
mkdir bld ;# Build will occur in a sibling directory
143142
cd bld ;# Change to the build directory
144143
../sqlite/configure ;# Run the configure script
@@ -164,4 +163,4 @@ AWK.
164163

165164
Contacts:
166165

167-
http://www.sqlite.org/
166+
http://www.sqlite.org/

0 commit comments

Comments
 (0)
0