crypto

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

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FAIL_MSG string = "FakeEncryptionWriter always fails this!"

Variables

This section is empty.

Functions

func IsPublicKey

func IsPublicKey(data string) bool

Types

type EncryptionWriter

type EncryptionWriter interface {
	SaveAndEncryptData(string, []byte) (string, error)
	EnsureCanWriteDiskOrExit()
}

type FakeEncryptionWriter

type FakeEncryptionWriter struct {
	AlwaysFailEncrypt       bool
	AlwaysFailWrite         bool
	AlwaysFailCanWriteCheck bool
	OutputDirectory         string
}

func (*FakeEncryptionWriter) EnsureCanWriteDiskOrExit

func (p *FakeEncryptionWriter) EnsureCanWriteDiskOrExit()

func (*FakeEncryptionWriter) SaveAndEncryptData

func (p *FakeEncryptionWriter) SaveAndEncryptData(uuid string, json []byte) (string, error)

type PGPEncryptionWriter

type PGPEncryptionWriter struct {
	PublicKey       string
	OutputDirectory string
}

func (*PGPEncryptionWriter) EnsureCanWriteDiskOrExit

func (p *PGPEncryptionWriter) EnsureCanWriteDiskOrExit()

func (*PGPEncryptionWriter) SaveAndEncryptData

func (p *PGPEncryptionWriter) SaveAndEncryptData(uuid string, json []byte) (string, error)

Jump to

Keyboard shortcuts

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