azure

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 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 AzureKMS

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

AzureKMS struct represents Azure Key Vault

func NewAzureKMS

func NewAzureKMS(vaultURL, key, keyVersion string) *AzureKMS

NewAzureKMS creates Azure Key Vault KMS

func (*AzureKMS) Decrypt

func (a *AzureKMS) 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 (*AzureKMS) Encrypt

func (a *AzureKMS) Encrypt(plaintext []byte) ([]byte, error)

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

Jump to

Keyboard shortcuts

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