Categorygithub.com/gdanko/gorm-sqlcipher
modulepackage
0.0.0-20240818172314-97e237fc6bca
Repository: https://github.com/gdanko/gorm-sqlcipher.git
Documentation: pkg.go.dev

# README

gorm-sqlcipher

This version of gorm-sqlcipher was created specifically to work with my enpass CLI, which requires _pragma_cipher_compatibility=3. This was achieved by using an older version of go-sqliciper that still supports compatibility 3. I also had to fix a couple of bugs in sqlite.go that were present in every other library I tried.

Installation

go get github.com/gdanko/gorm-sqlcipher

How to use

import (
	sqlcipher "github.com/gdanko/gorm-sqlcipher"
	"gorm.io/gorm"
)

key := "2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99"
dbFile := "/path/to/my.db"
dbName := fmt.Sprintf("%s?_pragma_key=x'%s'&_pragma_cipher_compatibility=3", dbFile, key)
db, err := gorm.Open(sqlcipher.Open(dbName), &gorm.Config{})

More

# Functions

No description provided by the author

# Constants

DriverName is the default driver name for SQLite.

# Variables

No description provided by the author

# Structs

No description provided by the author
No description provided by the author