crypt

package
v0.0.0-...-218c583 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyLength   = 32
	NonceLength = 24
)

Variables

This section is empty.

Functions

func KMS

func KMS(c *Crypt) *kms.KMS

Types

type Credentials

type Credentials struct {
	Crypt *Crypt
}

func (*Credentials) IsExpired

func (cc *Credentials) IsExpired() bool

func (*Credentials) Retrieve

func (cc *Credentials) Retrieve() (credentials.Value, error)

type Crypt

type Crypt struct {
	AwsRegion string
	AwsAccess string
	AwsSecret string
	AwsToken  string
}

func New

func New(region, access, secret string) *Crypt

func NewIam

func NewIam(role string) (*Crypt, error)

func (*Crypt) Decrypt

func (c *Crypt) Decrypt(keyArn string, data []byte) ([]byte, error)

func (*Crypt) Encrypt

func (c *Crypt) Encrypt(keyArn string, dec []byte) ([]byte, error)

type Envelope

type Envelope struct {
	Ciphertext   []byte `json:"c"`
	EncryptedKey []byte `json:"k"`
	Nonce        []byte `json:"n"`
}

type Instance

type Instance struct {
	Region string `json::"region"`
}

type Role

type Role struct {
	Access string `json:"AccessKeyId"`
	Secret string `json:"SecretAccessKey"`
	Token  string `json:"Token"`
}

Jump to

Keyboard shortcuts

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