crypto

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const GpgBin = "gpg"

Variables

This section is empty.

Functions

func GetPubRingArmor

func GetPubRingArmor(keyID string) ([]byte, error)

TODO : unit tests Here we read armored version of Key by calling GPG process

func GetSecretRingArmor

func GetSecretRingArmor(keyID string) ([]byte, error)

Types

type CachedKey

type CachedKey struct {
	KeyId string `json:"keyId"`
	Body  []byte `json:"body"`
}

CachedKey is the data transfer object describing format of key ring cache

type Crypter

type Crypter interface {
	Encrypt(writer io.Writer) (io.WriteCloser, error)
	Decrypt(reader io.Reader) (io.Reader, error)
}

Crypter is responsible for making cryptographical pipeline parts when needed

type GpgKeyExportError

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

func NewGpgKeyExportError

func NewGpgKeyExportError(text string) GpgKeyExportError

func (GpgKeyExportError) Error

func (err GpgKeyExportError) Error() string

type SymmetricKey

type SymmetricKey interface {
	Generate() error
	Encrypt() error
	Decrypt() error
	GetKey() []byte
	SetKey([]byte) error
	GetEncryptedKey() []byte
	SetEncryptedKey([]byte) error
	GetKeyID() string
	GetEncryptedKeyLen() int
	GetKeyLen() int
}

SymmetricKey encryption interface Used by AWS KMS Crypter When implement another crypters, can be moved to crypto package

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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