crypto

package
v0.0.0-...-f427959 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

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

func NewCrypto

func NewCrypto(keyFile string) (*Crypto, error)

func (*Crypto) Decompress

func (c *Crypto) Decompress(in, out []byte) error

func (*Crypto) DecryptAttributes

func (c *Crypto) DecryptAttributes(at []byte) ([]byte, error)

func (*Crypto) DecryptBlockIndexEntry

func (c *Crypto) DecryptBlockIndexEntry(be []byte, iv []byte) error

func (*Crypto) DecryptFileData

func (c *Crypto) DecryptFileData(fd []byte) ([]byte, error)

func (*Crypto) DecryptFilename

func (c *Crypto) DecryptFilename(fn []byte) ([]byte, error)

func (*Crypto) EncryptAttributes

func (c *Crypto) EncryptAttributes(at []byte, iv []byte) ([]byte, error)

func (*Crypto) EncryptBlockIndexEntry

func (c *Crypto) EncryptBlockIndexEntry(be []byte, iv []byte) error

func (*Crypto) EncryptFileData

func (c *Crypto) EncryptFileData(fd, iv []byte) ([]byte, error)

func (*Crypto) EncryptFilename

func (c *Crypto) EncryptFilename(fn []byte) ([]byte, error)

type StoreConnection

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

func NewStoreConnection

func NewStoreConnection(host, ca, cert, key string) (*StoreConnection, error)

Takes following crypto parameters

host - server hostname used for TLS verification.
ca - server trusted certificate authority.
cert - certificate from own pair.
key - private key from own pair.

func (*StoreConnection) Connect

func (s *StoreConnection) Connect(host string) (*tls.Conn, error)

Jump to

Keyboard shortcuts

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