azure

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: Apache-2.0 Imports: 10 Imported by: 2

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("key vault URL is empty or missing")
	// ErrKeyMissing = this is the custom error, returned when the KeyVault key is missing
	ErrKeyMissing = errors.New("key vault key is empty or missing")
	// ErrKeyVersionMissing = this is the custom error, returned when the KeyVault key version is missing
	ErrKeyVersionMissing = errors.New("key vault key version is empty or missing")
)

Functions

This section is empty.

Types

type KeyVault added in v0.2.0

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

KeyVault struct represents Azure Key Vault

func New added in v0.0.4

func New(vaultURL, key, keyVersion string) (*KeyVault, error)

New creates Azure Key Vault KeyVault

func (*KeyVault) Decrypt added in v0.2.0

func (k *KeyVault) 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 (*KeyVault) Encrypt added in v0.2.0

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

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

type MetadataHeader added in v0.2.0

type MetadataHeader struct {
	Provider                string `json:"provider"`
	CryptVersion            string `json:"crypt"`
	AzureKeyVaultURL        string `json:"kvURL"`
	AzureKeyVaultKeyName    string `json:"kvKey"`
	AzureKeyVaultKeyVersion string `json:"kvKeyVer"`
}

MetadataHeader holds information about KeyVault key used to encrypt

Jump to

Keyboard shortcuts

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