Documentation ¶
Index ¶
- Constants
- Variables
- func AesCBCDecrypter(key interface{}, r io.Reader, w io.Writer) (written int64, err error)
- func AesCBCEncrypter(key interface{}, r io.Reader, w io.Writer) (written int64, err error)
- func AesCTRDecrypter(key interface{}, r io.Reader, w io.Writer) (int64, error)
- func AesCTREncrypter(key interface{}, r io.Reader, w io.Writer) (int64, error)
- func AesGCMDecrypter(key interface{}, r io.Reader, w io.Writer) (int64, error)
- func AesGCMEncrypter(key interface{}, r io.Reader, w io.Writer) (int64, error)
- func AesOFBDecrypter(key interface{}, r io.Reader, w io.Writer) (int64, error)
- func AesOFBEncrypter(key interface{}, r io.Reader, w io.Writer) (int64, error)
- func Decrypt(mode string, key interface{}, r io.Reader, w io.Writer) (int64, error)
- func Encrypt(mode string, key interface{}, r io.Reader, w io.Writer) (int64, error)
- func GetCipher(mode string) (Encrypter, Decrypter)
- func GetVaultKey(name string) []byte
- func GetVaultPath(sum []byte) string
- func Marshal(mode string, key interface{}, v interface{}) (data []byte, err error)
- func NoopDecrypter(key interface{}, r io.Reader, w io.Writer) (int64, error)
- func NoopEncrypter(key interface{}, r io.Reader, w io.Writer) (int64, error)
- func Unmarshal(mode string, key interface{}, data []byte, v interface{}) (err error)
- type Decrypter
- type DriverFs
- type DriverS3
- type Encrypter
- type Vault
- func (v *Vault) Get(name string, w io.Writer) (written int64, err error)
- func (v *Vault) GetMeta(name string) (vm VaultMetadata, err error)
- func (v *Vault) Has(name string) bool
- func (v *Vault) Put(name string, meta VaultMetadata, r io.Reader) (written int64, err error)
- func (v *Vault) Remove(name string) error
- type VaultDriver
- type VaultElement
- type VaultMetadata
Constants ¶
View Source
const ( KeySize = 32 NonceSize = 12 )
Variables ¶
View Source
var VaultFileExistsError = errors.New("Vault file already exists")
Functions ¶
func AesCBCDecrypter ¶
func AesCBCEncrypter ¶
func AesCTRDecrypter ¶
func AesCTREncrypter ¶
func AesGCMDecrypter ¶
this implementation required to load all information into memory before decrypting data.
func AesGCMEncrypter ¶
this implementation required to load all information into memory before encrypting data.
func AesOFBDecrypter ¶
func AesOFBEncrypter ¶
func GetVaultKey ¶
func GetVaultPath ¶
Types ¶
type DriverS3 ¶
type DriverS3 struct { Root string Bucket string Region string EndPoint string Credentials *credentials.Credentials // contains filtered or unexported fields }
type Vault ¶
type Vault struct { Driver VaultDriver Algo string BaseKey []byte }
type VaultDriver ¶
type VaultElement ¶
type VaultElement struct { MetaKey []byte `json:"meta_key"` BinKey []byte `json:"bin_key"` Algo string `json:"algo"` Hash string `json:"hash"` }
func NewVaultElement ¶
func NewVaultElement() *VaultElement
type VaultMetadata ¶
type VaultMetadata map[string]interface{}
func NewVaultMetadata ¶
func NewVaultMetadata() VaultMetadata
Click to show internal directories.
Click to hide internal directories.