secret

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//Client is a shared instance
	Client secretbackend.Driver
)

Functions

func Decrypt

func Decrypt(data []byte) ([]byte, error)

Decrypt data using aes+hmac algorithm Init() must be called before any decryption

func DecryptS

func DecryptS(ptype sdk.VariableType, val sql.NullString, data []byte, clear bool) (string, error)

DecryptS wrap Decrypt and: - return Placeholder instead of value if not needed - cast returned value in string

func Encrypt

func Encrypt(data []byte) ([]byte, error)

Encrypt data using aes+hmac algorithm Init() must be called before any encryption

func EncryptS

func EncryptS(ptype sdk.VariableType, value string) (sql.NullString, []byte, error)

EncryptS wrap Encrypt and: - return valid string if type is not a password - cipher and returned ciphered value in a []byte if password

func Init

func Init(secretBackendBinary string, opts map[string]string) error

Init password manager if secretBackendBinary is empty, use default AES key and default file secret backend

func Status

func Status() string

Status return status for secret backend

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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