vault

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2016 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 16
View Source
const KeySize = 32

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Name string            `json:"name"`
	Vars map[string]string `json:"vars"`
}

type Environments

type Environments map[string]Environment

type KeyDetails

type KeyDetails struct {
	Digest     string `json:"digest"`
	Salt       string `json:"salt"`
	Iterations int    `json:"iterations"`
}

type Vault

type Vault struct {
	KeyDetails KeyDetails `json:"keyDetails"`

	MACDigest  string `json:"macDigest"`
	Cipher     string `json:"cipher"`
	CipherMode string `json:"cipherMode"`

	MAC          string `json:"mac"`
	IV           string `json:"iv"`
	Environments string `json:"environments"`
}

func (*Vault) DecryptEnvironments

func (v *Vault) DecryptEnvironments(key []byte) (Environments, error)

func (*Vault) EncryptEnvironments

func (v *Vault) EncryptEnvironments(key []byte, envs Environments) error

func (*Vault) GenerateKey

func (v *Vault) GenerateKey(password string) ([]byte, error)

Jump to

Keyboard shortcuts

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