crypto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TemplateFunctions added in v0.0.5

func TemplateFunctions() template.FuncMap

TemplateFunctions provides template functions for render or the standard (text/template) template engine

  • encryptAWS - encrypts the data from inside of the template using AWS KMS, for best results use with gzip and b64enc
  • decryptAWS - decrypts the data from inside of the template using AWS KMS, for best results use with ungzip and b64dec
  • encryptGCP - encrypts the data from inside of the template using GCP KMS, for best results use with gzip and b64enc
  • decryptGCP - decrypts the data from inside of the template using GCP KMS, for best results use with ungzip and b64dec
  • encryptAzure - encrypts the data from inside of the template using Azure Key Vault, for best results use with gzip and b64enc
  • decryptAzure - decrypts the data from inside of the template using Azure Key Vault, for best results use with ungzip and b64dec

Types

type Crypt

type Crypt interface {
	Crypter
	EncryptFile(inputPath, outputPath string) error
	DecryptFile(inputPath, outputPath string) error
}

Crypt is an abstraction for encryption and decryption with files support

func New added in v0.0.4

func New(kms Crypter) Crypt

New creates a new Crypt with the given provider

type Crypter added in v0.1.0

type Crypter interface {
	Encrypter
	Decrypter
}

Crypter is an Encrypter and a Decrypter

type Decrypter added in v0.1.0

type Decrypter interface {
	Decrypt(ciphertext []byte) ([]byte, error)
}

Decrypter must be able to decrypt ciphertext into plaintext, see also Encrypter

type Encrypter added in v0.1.0

type Encrypter interface {
	Encrypt(plaintext []byte) ([]byte, error)
}

Encrypter must be able to encrypt plaintext into ciphertext, see also Decrypter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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