sqlite

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2023 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyStore

type KeyStore struct {
	// contains filtered or unexported fields
}

KeyStore is an implementation of encid.KeyStore backed by a SQLite database.

func New

func New(ctx context.Context, filename string, newcipher func([]byte) (cipher.Block, error)) (*KeyStore, error)

New creates a new SQLite-backed keystore using the given file. The newcipher function takes a key and returns a cipher for encrypting and decrypting.

func (*KeyStore) DecoderByID

func (ks *KeyStore) DecoderByID(ctx context.Context, id int64) (typ int, dec func(dst, src []byte), err error)

func (*KeyStore) EncoderByType

func (ks *KeyStore) EncoderByType(ctx context.Context, typ int) (id int64, enc func(dst, src []byte), err error)

func (*KeyStore) NewKey

func (ks *KeyStore) NewKey(ctx context.Context, typ, keysize int) (int64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL