azure

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrVaultURLMissing - this is the custom error, returned when vault url is missing
	ErrVaultURLMissing = errors.New("vault url is empty or missing")
	// ErrKeyMissing = this is the custom error, returned when the key is missing
	ErrKeyMissing = errors.New("key is empty or missing")
	// ErrKeyVersionMissing = this is the custom error, returned when the key version is missing
	ErrKeyVersionMissing = errors.New("key version is empty or missing")
)

Functions

This section is empty.

Types

type KMS added in v0.0.4

type KMS struct {
	// contains filtered or unexported fields
}

KMS struct represents Azure Key Vault

func New added in v0.0.4

func New(vaultURL, key, keyVersion string) *KMS

New creates Azure Key Vault KMS

func (*KMS) Decrypt added in v0.0.4

func (k *KMS) Decrypt(ciphertext []byte) ([]byte, error)

Decrypt is responsible for decrypting ciphertext by Azure Key Vault encryption key and returning plaintext in bytes. See Crypt.EncryptFile

func (*KMS) Encrypt added in v0.0.4

func (k *KMS) Encrypt(plaintext []byte) ([]byte, error)

Encrypt is encrypts plaintext using Azure Key Vault and returns ciphertext See Crypt.Encrypt

Jump to

Keyboard shortcuts

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