8000 GitHub - annyfun/gorm-sqlcipher: A gorl-sqlcipher module that works with the latest gorm module and supports "_pragma_cipher_compatibility=3"
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A gorl-sqlcipher module that works with the latest gorm module and supports "_pragma_cipher_compatibility=3"

License

Notifications You must be signed in to change notification settings

annyfun/gorm-sqlcipher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A gorl-sqlcipher module that works with the latest gorm module and supports "_pragma_cipher_compatibility=3"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0