crypt

package
v0.0.0-...-d45b8fb Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 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"`
}

Jump to

Keyboard shortcuts

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