crypter

package
v8.0.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: MIT Imports: 22 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 Initialize

func Initialize() (string, string, error)

func Stream

func Stream(enctype string, key, iv []byte) (cipher.Stream, cipher.Stream, 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) ASCIIHexDecode

func (vault *Vault) ASCIIHexDecode(s string) string

func (*Vault) ASCIIHexEncode

func (vault *Vault) ASCIIHexEncode(s string, n int) string

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) 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) Keygen

func (vault *Vault) Keygen(length int) (string, 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) ReadConfig

func (vault *Vault) ReadConfig(store string, master string) (VaultCreds, error)

func (*Vault) Status

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

func (*Vault) Unseal

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

func (*Vault) WriteConfig

func (vault *Vault) WriteConfig(store string, master string, creds VaultCreds) error

type VaultCreds

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

Jump to

Keyboard shortcuts

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