Skip to content

StinkyPeach/sqlite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GORM Sqlite Cipher Driver

Description

Go SQLite3 driver for GORM by encrypting the SQLite3 database with AES-256 conforming to the built-in database / SQL interface

USAGE

import (
  "fmt"
  sqlite "github.com/StinkyPeach/sqlite"
  "gorm.io/gorm"
)

key := "your's key"
dbName := "test.db"
DSN := dbName + fmt.Sprintf("?_pragma_key=%s&_pragma_cipher_page_size=4096", key)
db, err := gorm.Open(sqlite.Open(DSN), &gorm.Config{})

Checkout https://gorm.io for details.

Acknowledgement

Packages

No packages published

Languages

  • Go 100.0%