akcf

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(
	out io.Writer,
	dataReader io.Reader,
	dataLength int64,
	dataDigest map[string]string,
	options *EncryptOptions,
) error

Types

type DataMetadata

type DataMetadata struct {
	Length int64
	Digest map[string]string
}

type DecryptOptions

type DecryptOptions struct {
	Keyring    saltpack.Keyring
	SigKeyring saltpack.SigKeyring
}

type EncryptOptions

type EncryptOptions struct {
	BoxKey     saltpack.BoxSecretKey
	SigningKey saltpack.SigningSecretKey
}

type EncryptionMetadata

type EncryptionMetadata struct {
	Cipher string
	Key    string
}

func (EncryptionMetadata) KeyBytes

func (m EncryptionMetadata) KeyBytes() ([]byte, error)

type FileInfo

type FileInfo struct {
	PublicMetadata  PublicMetadata
	PrivateMetadata PrivateMetadata
}

func Decrypt

func Decrypt(reader io.Reader, options *DecryptOptions) (*FileInfo, []byte, error)

func DecryptSeekableStream

func DecryptSeekableStream(reader io.ReadSeeker, options *DecryptOptions) (*FileInfo, io.ReadSeeker, error)

type PrivateMetadata

type PrivateMetadata struct {
	Encryption EncryptionMetadata
	Data       DataMetadata
}

type PublicMetadata

type PublicMetadata struct {
	Data DataMetadata
}

Jump to

Keyboard shortcuts

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