Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 88abdaa

Browse files
author
auxten
committed
more readme
1 parent 67be480 commit 88abdaa

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

‎README.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
go-sqlite3-encrypt
22
==========
33

4-
[![GoDoc Reference](https://godoc.org/github.com/mattn/go-sqlite3?status.svg)](http://godoc.org/github.com/mattn/go-sqlite3)
5-
[![Build Status](https://travis-ci.org/mattn/go-sqlite3.svg?branch=master)](https://travis-ci.org/mattn/go-sqlite3)
6-
[![Coverage Status](https://coveralls.io/repos/mattn/go-sqlite3/badge.svg?branch=master)](https://coveralls.io/r/mattn/go-sqlite3?branch=master)
7-
[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-sqlite3)](https://goreportcard.com/report/github.com/mattn/go-sqlite3)
4+
[![GoDoc Reference](https://godoc.org/github.com/CovenantSQL/go-sqlite3-encrypt?status.svg)](http://godoc.org/github.com/CovenantSQL/go-sqlite3-encrypt)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/CovenantSQL/go-sqlite3-encrypt)](https://goreportcard.com/report/github.com/CovenantSQL/go-sqlite3-encrypt)
86

97
# Description
10-
go-sqlite3-encrypt is go-sqlite3 with sqlcipher. follow the instructions below, the cipher extension will be builtin by default.
11-
12-
you have 2 ways to enable cipher:
138

14-
1. DSN
15-
1. You can try DSN like this, `sql.Open("sqlite3", "file:dbFileName?_crypto_key=auxten")`
16-
1. PRAGMA
17-
1. After Open db, before execute any statement do `db.Exec("PRAGMA key = auxten;")`
9+
go-sqlite3-encrypt is go-sqlite3 with sqlcipher. follow the instructions below, the cipher extension will be builtin by default.
1810

11+
For easy building, I also put libTomCrypt related files in project.
1912

2013
sqlite3 driver conforming to the built-in database/sql interface
2114

@@ -28,6 +21,7 @@ Supported Golang version:
2821
### Overview
2922

3023
- [Installation](#installation)
24+
- [HowTo Encrypt](#howto-encrypt)
3125
- [API Reference](#api-reference)
3226
- [Connection String](#connection-string)
3327
- [Features](#features)
@@ -55,14 +49,32 @@ Supported Golang version:
5549

5650
This package can be installed with the go get command:
5751

58-
go get github.com/mattn/go-sqlite3
52+
go get github.com/CovenantSQL/go-sqlite3-encrypt
5953

6054
_go-sqlite3_ is *cgo* package.
6155
If you want to build your app using go-sqlite3, you need gcc.
62-
However, after you have built and installed _go-sqlite3_ with `go install github.com/mattn/go-sqlite3` (which requires gcc), you can build your app without relying on gcc in future.
56+
However, after you have built and installed _go-sqlite3_ with `go install github.com/CovenantSQL/go-sqlite3-encrypt` (which requires gcc), you can build your app without relying on gcc in future.
6357

6458
***Important: because this is a `CGO` enabled package you are required to set the environment variable `CGO_ENABLED=1` and have a `gcc` compile present within your path.***
6559

60+
# HowTo Encrypt
61+
62+
You have 2 ways to enable encryption:
63+
64+
### DSN
65+
66+
1. You can try DSN like this, `sql.Open("sqlite3", "file:dbFileName?_crypto_key=auxten")`
67+
### PRAGMA
68+
69+
1. After Open db, before execute any statement do `db.Exec("PRAGMA key = auxten;")`
70+
71+
Thanks for the great works of [sqlcipher](https://github.com/sqlcipher/sqlcipher), [libtomcrypt](https://github.com/libtom/libtomcrypt) and [go-sqlite3](https://github.com/mattn/go-sqlite3)
72+
73+
For more details:
74+
1. https://github.com/sqlcipher/sqlcipher
75+
1. https://github.com/libtom/libtomcrypt
76+
1. https://github.com/mattn/go-sqlite3
77+
6678
# API Reference
6779

6880
API documentation can be found here: http://godoc.org/github.com/mattn/go-sqlite3

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /