crypto

package
v0.0.0-...-5a94a59 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcIVAndSeek

func CalcIVAndSeek(seekOffset int64) ([]byte, int64)

func ComputeMAC

func ComputeMAC(messageHash []byte, key []byte) []byte

func DecryptBlobEntry

func DecryptBlobEntry(in io.Reader, seekOffset int64, key []byte) io.Reader

take advantage of AES-CTR by seeking assume seekOffset is where this reader is "starting", and the seeking has *already taken place* (e.g. by a Range query to s3)

func DecryptDatabaseV2

func DecryptDatabaseV2(data []byte, dbKey []byte) []byte

lazy buffer for now - need to peel the last 32 bytes off, which is super annoying to do on an io.Reader of unknown length!

func EncryptBlob

func EncryptBlob(out io.Writer, seekOffset int64) (io.Writer, []byte)

func EncryptBlobWithKey

func EncryptBlobWithKey(out io.Writer, seekOffset int64, key []byte) io.Writer

func EncryptDatabaseV2

func EncryptDatabaseV2(out io.Writer, dbKey []byte) io.Writer

func LegacyDecryptDatabase

func LegacyDecryptDatabase(data []byte, key []byte) []byte

func LegacyEncryptDatabase

func LegacyEncryptDatabase(data []byte, key []byte) []byte

func RandBytes

func RandBytes(length int) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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