crypt

package
Version: v0.0.0-...-e962bfa Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 7 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 Crypt

type Crypt struct {
	Region string
}

func New

func New() *Crypt

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"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL