crypter

package
v8.0.17+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: MIT Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ASCIIHexDecode

func ASCIIHexDecode(s string) string

func ASCIIHexEncode

func ASCIIHexEncode(s string, n int) string

func Stream

func Stream(enctype string, key, iv []byte) (cipher.Stream, cipher.Stream, error)

func WriteConfig

func WriteConfig(path, master string, creds VaultCreds) error

Types

type Vault

type Vault struct {
	URL   string
	Token string
	HTTP  *http.Client
}

func NewVault

func NewVault(url, cacert string) (Vault, error)

func (*Vault) CreateBackupEncryptionConfig

func (vault *Vault) CreateBackupEncryptionConfig(enctype string) (string, string, error)

CreateBackupEncryptionConfig creats random keys and corresponding iv's for a given cipher It returns both a key and iv (hex format)

func (*Vault) Delete

func (vault *Vault) Delete(path string) error

func (*Vault) Do

func (vault *Vault) Do(method, url string, data interface{}) (*http.Response, error)

func (*Vault) FixedKeygen

func (vault *Vault) FixedKeygen() (string, error)

func (*Vault) Get

func (vault *Vault) Get(path string) (map[string]interface{}, bool, error)

func (*Vault) Init

func (vault *Vault) Init(store string, master string) (string, error)

func (*Vault) IsInitialized

func (vault *Vault) IsInitialized() (bool, error)

func (*Vault) IsSealed

func (vault *Vault) IsSealed() (bool, error)

func (*Vault) NewRequest

func (vault *Vault) NewRequest(method, url string, data interface{}) (*http.Request, error)

func (*Vault) Put

func (vault *Vault) Put(path string, data interface{}) error

func (*Vault) Status

func (vault *Vault) Status() (string, error)

func (*Vault) Unseal

func (vault *Vault) Unseal(key string) error

type VaultCreds

type VaultCreds struct {
	SealKey   string `json:"seal_key"`
	RootToken string `json:"root_token"`
}

func ReadConfig

func ReadConfig(path string, master string) (VaultCreds, error)

Jump to

Keyboard shortcuts

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