enc

package
v0.0.0-...-52eb507 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(content []byte, dest, privateKeyPath string) (err error)

func DecryptFromBTFS

func DecryptFromBTFS(cid, dest, privateKeyPath string) (err error)

func DecryptFromLocal

func DecryptFromLocal(source, dest, privateKeyPath string) (err error)

func Encrypt

func Encrypt(source, publicKeyPath string) (content []byte, err error)

func EncryptToBTFS

func EncryptToBTFS(source, publicKeyPath string) (rst *btfs.AddResult, err error)

func EncryptToLocal

func EncryptToLocal(source, dest, publicKeyPath string) (err error)

Types

type Header struct {
	Version                   string                 `json:"version"`
	SecretEncryptionAlgorithm string                 `json:"secret_encrypt_algorithm"`
	Secret                    string                 `json:"secret"`
	EncryptionAlgorithm       string                 `json:"encryption_algorithm"`
	Encoding                  string                 `json:"encoding"`
	PublicInfo                map[string]interface{} `json:"public_info"`
}

Jump to

Keyboard shortcuts

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